I don't believe that this is currently possible with Chrome. If you check your call to _WD_CreateSession, it is likely failing because there was a recent change by Google to this area. Try changing "chromeOptions" to "goog:chromeOptions" Try changing $_WD_DEBUG to $_WD_DEBUG_None and the console window will be hidden Hard to say without further details, but you can likely remove the call to _WD_WaitElement and also the line _WD_ElementAction($sSession, $sElement, 'c