Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

fillField failing for good "field" #345

Open
crossan007 opened this issue Jul 9, 2019 · 8 comments
Open

fillField failing for good "field" #345

crossan007 opened this issue Jul 9, 2019 · 8 comments

Comments

@crossan007
Copy link

crossan007 commented Jul 9, 2019

Seeing a weird issue when running ChromeDriver 75, Behat 3.5.0, MinkExtension 2.3.1 on Windows with Selenium

Every call to MinkContext::fillField fails because Behat\Mink\Element::findAll returns null, and I get an ElementNotFoundException.

The referenced field is valid, and works in my CI tests (running older versions of dependencies and via SauceLabs)

I took a look at the generated xPath, and it looked really over-complicated(but might still have been valid).

I don't see anything in the selenium console logs to indicate a failed "find", but I'm not sure it would show there anyway.

Any pointers where to dig deeper?

@SirPL
Copy link

SirPL commented Jul 9, 2019

I'm facing similar issue which may be related to this one – the $page->getContent() returns valid HTML code, but $page->find('css', 'html') returns null. The same occurs for every other valid tag and id.

@crossan007
Copy link
Author

yes; $page->getContent() does return the DOM

@crossan007
Copy link
Author

I reverted my Chrome browser from Version 75 to Version 74, and also reverted my version of ChromeDriver.exe, and the problem appears to have gone away.

It would appear that something in the upgrade from Chrome 74 to Chrome 75 (or ChromeDriver) causes this issue

@crossan007
Copy link
Author

I seem to get this error on Firefox 68 with GeckoDriver as well.

Still digging in to see if I can figure out the culprit.

@crossan007
Copy link
Author

I think this is documented as in issue in the GeckoDriver repository: mozilla/geckodriver#1581

It's odd that it seems to affect both Chrome and Firefox equally

@crossan007
Copy link
Author

Ah ha. I think I uncovered some more details here.

It looks like, starting with Chrome 75, the selenium mode defaults to w3c, and the MinkSelenium2Driver is considering switching from instaclick/php-webdriver to facebook/php-webdriver, but is holding off because of PHP7 support: minkphp/MinkSelenium2Driver#293 (comment)

@crossan007
Copy link
Author

And a solution! (Or at least a temporary workaround):

In the thread above, they suggested turning off W3C mode for chrome.

So, adding that to my behat.yml file, I get this (note the extra_capabilities, chromeOptions, w3c:false)

default:
  suites:
        default:
            contexts:
                - nwcontext:form
                - nwcontext:formstone
                - nwcontext:select2
                - FeatureContext
  extensions:
    Novaway\CommonContexts\Extension: ~
    Behat\MinkExtension:
      base_url: http://localhost/crm
      selenium2:
        browser: chrome
        capabilities:
          browserName: "chrome"
          extra_capabilities:
            chromeOptions:
              w3c: false

crossan007 added a commit to ChurchCRM/CRM that referenced this issue Jul 12, 2019
Mink Extension's fill field fails because W3C mode on Chrome 75+ causes MinkSelenium2Driver to break:
Behat/MinkExtension#345
and
minkphp/MinkSelenium2Driver#293 (comment)
@crossan007
Copy link
Author

also related: instaclick/php-webdriver#84

rija pushed a commit to rija/gigadb-website that referenced this issue Jan 3, 2020
phantomjs is increasingly flaky, so we switch to another headless browser.
Unfortunately SeleniumWebDriver support for Firefox has
non-workaroundable or no-upcoming-fixes-soon problems [1] ,
only Chrome up to version 74 works [2], but it's a better place to be.

By switching to Chrome, we have to alter (actually improve) a couple
of background scenarios.

Also *.dev domains are restricted in Chrome [3] so switching the internal
domain to *.test.

[1] https://stackoverflow.com/questions/46913377/php-codeception-not-so-quick-start-phpunit-framework-exception-undefined-inde
[2] Behat/MinkExtension#345
[3] https://www.theregister.co.uk/2017/11/29/google_dev_network/
rija pushed a commit to rija/gigadb-website that referenced this issue Aug 22, 2020
phantomjs is increasingly flaky, so we switch to another headless browser.
Unfortunately SeleniumWebDriver support for Firefox has
non-workaroundable or no-upcoming-fixes-soon problems [1] ,
only Chrome up to version 74 works [2], but it's a better place to be.

By switching to Chrome, we have to alter (actually improve) a couple
of background scenarios.

Also *.dev domains are restricted in Chrome [3] so switching the internal
domain to *.test.

[1] https://stackoverflow.com/questions/46913377/php-codeception-not-so-quick-start-phpunit-framework-exception-undefined-inde
[2] Behat/MinkExtension#345
[3] https://www.theregister.co.uk/2017/11/29/google_dev_network/
rija pushed a commit to rija/gigadb-website that referenced this issue Sep 6, 2020
phantomjs is increasingly flaky, so we switch to another headless browser.
Unfortunately SeleniumWebDriver support for Firefox has
non-workaroundable or no-upcoming-fixes-soon problems [1] ,
only Chrome up to version 74 works [2], but it's a better place to be.

By switching to Chrome, we have to alter (actually improve) a couple
of background scenarios.

Also *.dev domains are restricted in Chrome [3] so switching the internal
domain to *.test.

[1] https://stackoverflow.com/questions/46913377/php-codeception-not-so-quick-start-phpunit-framework-exception-undefined-inde
[2] Behat/MinkExtension#345
[3] https://www.theregister.co.uk/2017/11/29/google_dev_network/
rija pushed a commit to rija/gigadb-website that referenced this issue Sep 19, 2020
phantomjs is increasingly flaky, so we switch to another headless browser.
Unfortunately SeleniumWebDriver support for Firefox has
non-workaroundable or no-upcoming-fixes-soon problems [1] ,
only Chrome up to version 74 works [2], but it's a better place to be.

By switching to Chrome, we have to alter (actually improve) a couple
of background scenarios.

Also *.dev domains are restricted in Chrome [3] so switching the internal
domain to *.test.

[1] https://stackoverflow.com/questions/46913377/php-codeception-not-so-quick-start-phpunit-framework-exception-undefined-inde
[2] Behat/MinkExtension#345
[3] https://www.theregister.co.uk/2017/11/29/google_dev_network/
rija pushed a commit to rija/gigadb-website that referenced this issue Sep 25, 2020
phantomjs is increasingly flaky, so we switch to another headless browser.
Unfortunately SeleniumWebDriver support for Firefox has
non-workaroundable or no-upcoming-fixes-soon problems [1] ,
only Chrome up to version 74 works [2], but it's a better place to be.

By switching to Chrome, we have to alter (actually improve) a couple
of background scenarios.

Also *.dev domains are restricted in Chrome [3] so switching the internal
domain to *.test.

[1] https://stackoverflow.com/questions/46913377/php-codeception-not-so-quick-start-phpunit-framework-exception-undefined-inde
[2] Behat/MinkExtension#345
[3] https://www.theregister.co.uk/2017/11/29/google_dev_network/
rija pushed a commit to rija/gigadb-website that referenced this issue Sep 29, 2020
phantomjs is increasingly flaky, so we switch to another headless browser.
Unfortunately SeleniumWebDriver support for Firefox has
non-workaroundable or no-upcoming-fixes-soon problems [1] ,
only Chrome up to version 74 works [2], but it's a better place to be.

By switching to Chrome, we have to alter (actually improve) a couple
of background scenarios.

Also *.dev domains are restricted in Chrome [3] so switching the internal
domain to *.test.

[1] https://stackoverflow.com/questions/46913377/php-codeception-not-so-quick-start-phpunit-framework-exception-undefined-inde
[2] Behat/MinkExtension#345
[3] https://www.theregister.co.uk/2017/11/29/google_dev_network/
rija pushed a commit to rija/gigadb-website that referenced this issue Nov 7, 2020
phantomjs is increasingly flaky, so we switch to another headless browser.
Unfortunately SeleniumWebDriver support for Firefox has
non-workaroundable or no-upcoming-fixes-soon problems [1] ,
only Chrome up to version 74 works [2], but it's a better place to be.

By switching to Chrome, we have to alter (actually improve) a couple
of background scenarios.

Also *.dev domains are restricted in Chrome [3] so switching the internal
domain to *.test.

[1] https://stackoverflow.com/questions/46913377/php-codeception-not-so-quick-start-phpunit-framework-exception-undefined-inde
[2] Behat/MinkExtension#345
[3] https://www.theregister.co.uk/2017/11/29/google_dev_network/
rija pushed a commit to rija/gigadb-website that referenced this issue Nov 23, 2020
phantomjs is increasingly flaky, so we switch to another headless browser.
Unfortunately SeleniumWebDriver support for Firefox has
non-workaroundable or no-upcoming-fixes-soon problems [1] ,
only Chrome up to version 74 works [2], but it's a better place to be.

By switching to Chrome, we have to alter (actually improve) a couple
of background scenarios.

Also *.dev domains are restricted in Chrome [3] so switching the internal
domain to *.test.

[1] https://stackoverflow.com/questions/46913377/php-codeception-not-so-quick-start-phpunit-framework-exception-undefined-inde
[2] Behat/MinkExtension#345
[3] https://www.theregister.co.uk/2017/11/29/google_dev_network/
rija pushed a commit to rija/gigadb-website that referenced this issue Jan 19, 2021
phantomjs is increasingly flaky, so we switch to another headless browser.
Unfortunately SeleniumWebDriver support for Firefox has
non-workaroundable or no-upcoming-fixes-soon problems [1] ,
only Chrome up to version 74 works [2], but it's a better place to be.

By switching to Chrome, we have to alter (actually improve) a couple
of background scenarios.

Also *.dev domains are restricted in Chrome [3] so switching the internal
domain to *.test.

[1] https://stackoverflow.com/questions/46913377/php-codeception-not-so-quick-start-phpunit-framework-exception-undefined-inde
[2] Behat/MinkExtension#345
[3] https://www.theregister.co.uk/2017/11/29/google_dev_network/
pli888 pushed a commit to pli888/gigadb-website that referenced this issue Nov 24, 2021
phantomjs is increasingly flaky, so we switch to another headless browser.
Unfortunately SeleniumWebDriver support for Firefox has
non-workaroundable or no-upcoming-fixes-soon problems [1] ,
only Chrome up to version 74 works [2], but it's a better place to be.

By switching to Chrome, we have to alter (actually improve) a couple
of background scenarios.

Also *.dev domains are restricted in Chrome [3] so switching the internal
domain to *.test.

[1] https://stackoverflow.com/questions/46913377/php-codeception-not-so-quick-start-phpunit-framework-exception-undefined-inde
[2] Behat/MinkExtension#345
[3] https://www.theregister.co.uk/2017/11/29/google_dev_network/
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