Skip to content

Commit c4dcacf

Browse files
committed
Describe a bit more how to use php-webdriver with Firefox
1 parent b231f09 commit c4dcacf

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ Download and run that file, replacing # with the current server version. Keep in
4343

4444
java -jar selenium-server-standalone-#.jar
4545

46-
When using Selenium server 3.5 and newer with some remote end clients (eg. Firefox with Geckodriver), you MUST disable so called "pass-through" mode, so that remote browser's protocol is translated to the protocol supported by php-webdriver (see [issue #469](https://github.com/facebook/php-webdriver/issues/469)):
47-
48-
java -jar selenium-server-standalone-#.jar -enablePassThrough false
46+
(Please see note below when using Firefox.)
4947

5048
Then when you create a session, be sure to pass the url to where your server is running.
5149

@@ -58,6 +56,13 @@ $host = 'http://localhost:4444/wd/hub'; // this is the default
5856

5957
Make sure to have latest Firefox and [Geckodriver](https://github.com/mozilla/geckodriver/releases) installed.
6058

59+
Because Firefox (and Geckodriver) only supports new W3C WebDriver protocol (which is yet to be implemented by php-wedbriver - see [issue #469](https://github.com/facebook/php-webdriver/issues/469)),
60+
the protocols must be translated by Selenium server - this feature is *partially* available in Selenium server version 3.5.0-3.8.1 and you can enable it like this:
61+
62+
java -jar selenium-server-standalone-3.8.1.jar -enablePassThrough false
63+
64+
Now you can start Firefox from your code:
65+
6166
```php
6267
$driver = RemoteWebDriver::create($host, DesiredCapabilities::firefox());
6368
```

0 commit comments

Comments
 (0)