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

MinkSelenium2Driver recent change breaks webUI tests #32143

Closed
phil-davis opened this issue Jul 24, 2018 · 3 comments · Fixed by #32144
Closed

MinkSelenium2Driver recent change breaks webUI tests #32143

phil-davis opened this issue Jul 24, 2018 · 3 comments · Fixed by #32144
Assignees
Milestone

Comments

@phil-davis
Copy link
Contributor

Steps to reproduce

  1. do a composer update to get the latest dependencies
  2. you will get later commits of dev-master for https://github.com/minkphp/MinkSelenium2Driver
  3. run a webUI test that types in a text box and presses enter, e.g.
bash tests/travis/start_ui_tests.sh --feature tests/acceptance/features/webUIFiles/createFolders.feature:15

Expected behaviour

The test passes.

Actual behaviour

The test fails with:

  Scenario: Create a folder inside another folder                             # /drone/src/tests/acceptance/features/webUIFiles/createFolders.feature:15
    When the user creates a folder with the name "top-folder" using the webUI # WebUIFilesContext::theUserCreatesAFolderUsingTheWebUI()
      WebDriver\Exception\StaleElementReference: stale element reference: element is not attached to the page document
        (Session info: chrome=67.0.3396.99)
        (Driver info: chromedriver=2.40.565383 (76257d1ab79276b2d53ee976b2c3e3b9f335cde7),platform=Linux 4.4.0-130-generic x86_64) in /drone/src/lib/composer/instaclick/php-webdriver/lib/WebDriver/Exception.php:155
      Stack trace:
      #0 /drone/src/lib/composer/instaclick/php-webdriver/lib/WebDriver/AbstractWebDriver.php(157): WebDriver\Exception::factory(10, 'stale element r...')
      #1 /drone/src/lib/composer/instaclick/php-webdriver/lib/WebDriver/AbstractWebDriver.php(218): WebDriver\AbstractWebDriver->curl('POST', '/execute', Array)
      #2 /drone/src/lib/composer/instaclick/php-webdriver/lib/WebDriver/Container.php(224): WebDriver\AbstractWebDriver->__call('execute', Array)
      #3 /drone/src/lib/composer/behat/mink-selenium2-driver/src/Selenium2Driver.php(295): WebDriver\Container->__call('execute', Array)
      #4 /drone/src/lib/composer/behat/mink-selenium2-driver/src/Selenium2Driver.php(699): Behat\Mink\Driver\Selenium2Driver->executeJsOnElement(Object(WebDriver\Element), 'var node = argu...')
      #5 /drone/src/lib/composer/behat/mink/src/Element/NodeElement.php(105): Behat\Mink\Driver\Selenium2Driver->setValue('(//html/.//*\n[s...', '\xEE\x80\x83\xEE\x80\x97\xEE\x80\x83\xEE\x80\x97\xEE\x80\x83...')
      #6 /drone/src/lib/composer/behat/mink/src/Element/TraversableElement.php(160): Behat\Mink\Element\NodeElement->setValue('top-folder\xEE\x80\x87')
#7 /drone/src/tests/acceptance/features/lib/FilesPage.php(136): Behat\Mink\Element\TraversableElement->fillField('New folder', 'top-folder\xEE\x80\x87')

Server configuration

Local git repo master branch, or on drone CI.

@phil-davis phil-davis added this to the development milestone Jul 24, 2018
@phil-davis phil-davis self-assigned this Jul 24, 2018
@phil-davis
Copy link
Contributor Author

The problem was introduced by minkphp/MinkSelenium2Driver#286

The setValue method now tries to blur out of the input field after typing the value to be set. But in our case, we already pressed enter at the end of the input, which makes the field go away immediately. So the attempt to blur out fails with StaleElementReference

@ownclouders
Copy link
Contributor

GitMate.io thinks possibly related issues are #13402 (... broken), #22485 (test), #31579 (test), #22492 (test), and #31408 (Add scenario result to webUI test output).

@phil-davis
Copy link
Contributor Author

minkphp/MinkSelenium2Driver#292 raises the issue with the upstream project.

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

Successfully merging a pull request may close this issue.

3 participants