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

Element not found with xpath-Exception in Behat project with Selenium and ChromeDriver 77 #98

Closed
mvoelker opened this issue Sep 24, 2019 · 3 comments

Comments

@mvoelker
Copy link

I do have massive problems with the current version of ChromeDriver in a Behat project.
All Behat\Mink\WebAssert->pageTextContains('xyz') calls fail with an Element not found with xpath, //html in vendor\instaclick\php-webdriver\lib\WebDriver\Exception.php:155 error.

Not sure if the problem source is Behat / Mink / Selenium2 / Selenium2-Driver / php-webdriver / ChromeDriver or Chrome itself.
I hoped that the new version 1.4.6 of php-webdriver will fix the problem ... but it did not.

(Relevant) Callstack:

And I wait to see "__content_loaded__and__init_done__"                     # FeatureContext::iWaitForTheTextToAppear()
	WebDriver\Exception\NoSuchElement: Element not found with xpath, //html
	 in vendor\instaclick\php-webdriver\lib\WebDriver\Exception.php:155
	Stack trace:
	#0 vendor\instaclick\php-webdriver\lib\WebDriver\Container.php(89): WebDriver\Exception::factory(7, 'Element not fou...')
	#1 vendor\behat\mink-selenium2-driver\src\Selenium2Driver.php(974): WebDriver\Container->element('xpath', '//html')
	#2 vendor\behat\mink-selenium2-driver\src\Selenium2Driver.php(511): Behat\Mink\Driver\Selenium2Driver->findElement('//html')
	#3 vendor\behat\mink\src\Element\Element.php(176): Behat\Mink\Driver\Selenium2Driver->getText('//html')
	#4 vendor\behat\mink\src\WebAssert.php(257): Behat\Mink\Element\Element->getText()
	#5 vendor\behat\mink-extension\src\Behat\MinkExtension\Context\MinkContext.php(292): Behat\Mink\WebAssert->pageTextContains('__content_loade...')
	#6 features\bootstrap\FeatureContext.php(367): Behat\MinkExtension\Context\MinkContext->assertPageContainsText('__content_loade...')

Versions from composer.json:

  • behat/behat v3.3.1
  • behat/gherkin v4.4.5
  • behat/mink v1.7.1
  • behat/mink-extension 2.3.1
  • behat/mink-selenium2-driver v1.3.1
  • instaclick/php-webdriver 1.4.6

Runtime versions:

  • php 7.3.9
  • selenium-server-standalone-3.141.59.jar
  • ChromeDriver 77.0.3865.40
  • Google Chrome 77.0.3865.90

Issue #92 sounds similar.

Any help is highly appreciated.

@robocoder
Copy link
Member

Would need to backport be87042

@robocoder
Copy link
Member

Fixed in 7e179d5

@mvoelker
Copy link
Author

I applied this patch / backported code change and it solves my problem.
Thank you - @robocoder - very much for this quick response and fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants