shalini6785 / php-webdriver-bindings

Automatically exported from code.google.com/p/php-webdriver-bindings
0 stars 0 forks source link

allow override of post url in WebDriver.php #33

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use chromedriver download from google code project
2. Use php-webdriver-bindings to communicate with chromedriver

This is probably an issue with the chromedriver project more than this project, 
but I was able to fix it with a small modification to WebDriver.php that does 
not change the behavior--just allows an override of the request url.

It seems that chrome driver expects post requests to come in to URL "/", 
instead of "/wd/hub".

I changed lines 26 and 27 in WebDriver.php to allow that override from a client 
object: 

  function __construct($host, $port, $url = "/wd/hub") {
        parent::__construct("http://" . $host . ":" . $port . $url);

It works fine for me so I thought I would share it.

Original issue reported on code.google.com by saltlake...@gmail.com on 24 Jan 2013 at 2:45

GoogleCodeExporter commented 9 years ago
Is this issue with specific version of ChromeDriver as well? What version of 
Chrome, ChromeDriver, and Selenium?

I had no issues with Chrome v27, Selenium 2.28, and not recent/latest version 
of ChromeDriver (don't recall specific version).

Original comment by manga...@gmail.com on 9 Jun 2013 at 7:39