In the original facebook php webdriver I could just use $script = "alert('hello world)"; $driver->executeScript($script); But there is no info on how this works in this fork.