Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHPUnit + Selenium 3.9 + Firefox 58 - Page elements are not found #5539

Closed
ijain opened this issue Feb 26, 2018 · 2 comments
Closed

PHPUnit + Selenium 3.9 + Firefox 58 - Page elements are not found #5539

ijain opened this issue Feb 26, 2018 · 2 comments

Comments

@ijain
Copy link

ijain commented Feb 26, 2018

Meta -

OS: Ubuntu 14.04 (64-bit)
Selenium Version: 3.9.0, 3.9.1
Browser: Firefox
Browser Version: 57, 58
Programming language: PHP: 7.0
Testing Framework: PHPUnit 6.4
PHP Webdriver Client: facebook/webdriver 1.5
Webdriver: Geckodriver 0.19.1

Expected Behavior -

Page elements, its values and properties are found by the corresponding framework classes (in the same way as I it works for Chrome browser).

Actual Behavior -

Firefox starts and is controlled by Selenium, but page elements are not found.

All is working under Selenium 3.8.1, with parameter '-enablePassThrough false'. But this parameter is not supported anymore for Selenium version 3.9. So, things are broken now.

Error examples:

  1. Facebook\WebDriver\Exception\UnknownCommandException: GET /session/b0ad47a7-c9b3-4f62-a40e-3be0efd9e301/element//attribute/class
    Build info: version: '3.9.1', revision: '63f7b50', time: '2018-02-07T22:42:28.403Z'
    System info: host: 'webdev-vm', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-116-generic', java.version: '1.8.0_141'
    Driver info: driver.version: unknown
  2. Facebook\WebDriver\Exception\UnknownCommandException: POST /session/de260f02-3bb3-481f-9bc1-23c16aa3c78f/element//elements
    Build info: version: '3.9.1', revision: '63f7b50', time: '2018-02-07T22:42:28.403Z'
    System info: host: 'webdev-vm', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-116-generic', java.version: '1.8.0_141'
    Driver info: driver.version: unknown
  3. Facebook\WebDriver\Exception\UnknownCommandException: POST /session/de260f02-3bb3-481f-9bc1-23c16aa3c78f/element//text
    Build info: version: '3.9.1', revision: '63f7b50', time: '2018-02-07T22:42:28.403Z'
    System info: host: 'webdev-vm', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-116-generic', java.version: '1.8.0_141'
    Driver info: driver.version: unknown

Log:
09:38:55.791 INFO - /session: Executing POST on /session (handler: BeginSession)
09:38:55.806 INFO - Capabilities are: Capabilities {acceptInsecureCerts: true, acceptSslCerts: false, args: --ignore-ssl-errors=yes, browserName: firefox, firefox_profile: UEsDBAoAAAAAANtMWkzf9RXUMgA...}
09:38:55.806 INFO - Capabilities {acceptInsecureCerts: true, acceptSslCerts: false, args: --ignore-ssl-errors=yes, browserName: firefox, firefox_profile: UEsDBAoAAAAAANtMWkzf9RXUMgA...} matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.firefox.GeckoDriverService)
1519630735814 geckodriver INFO geckodriver 0.19.1
1519630735817 geckodriver INFO Listening on 127.0.0.1:2006
1519630735934 mozrunner::runner INFO Running command: "/usr/bin/firefox" "-marionette" "-profile" "/tmp/rust_mozprofile.P9RpNhYTN433"
1519630736509 Marionette INFO Enabled via --marionette

(firefox:9645): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:9645): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:9645): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

Test Code:
$host = 'localohost:4444/wd/hub';
$capabilities = DesiredCapabilities::firefox();
$capabilities->setCapability('acceptSslCerts', false);
$capabilities->setCapability('acceptInsecureCerts', true);
$capabilities->setCapability('args', '--ignore-ssl-errors=yes');
$this->webDriver = RemoteWebDriver::create($host, $capabilities);
$this->webDriver->get($this->url); //any url
$step = $this->webDriver->findElement(WebDriverBy::cssSelector('step1'));
$this->webDriver->findElement(WebDriverBy::id('firstname'))->sendKeys('John');

@AutomatedTester
Copy link
Member

looking at the error messages this is a bug in the PHP bindings, they arent inserting the element ID into the url when speaking to geckodriver. Please a raise a bug with the facebook php bindings

@ijain
Copy link
Author

ijain commented Apr 5, 2018

Thank you. I will add the bug with facebook.

@lock lock bot locked and limited conversation to collaborators Aug 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants