spyoungtech / behave-webdriver

Selenium webdriver step library for use with the behave BDD testing framework
MIT License
62 stars 21 forks source link

"When I click on the link" isn't clicking on the link #78

Closed coreygans closed 5 years ago

coreygans commented 5 years ago

Reproduce

Use the following feature and test in Safari

   Given I open the url "https://behave-webdriver.readthedocs.io/en/latest/steps.html"
   When I click on the link "Read the Docs"
   When I pause for 2000ms
   Then I expect that element "h1" contains the text "Read the Docs"

Outcome

It shows a success that it clicked on the link, but watching it, it doesn't navigate to the link. Thus the final "Then" statement fails

    Given I open the url "https://behave-webdriver.readthedocs.io/en/latest/steps.html" # venv/lib/python3.7/site-packages/behave_webdriver/steps/actions_re.py:60 1.128s
    When I click on the link "Read the Docs"                                            # venv/lib/python3.7/site-packages/behave_webdriver/steps/actions.py:31 0.050s
    When I pause for 2000ms                                                             # venv/lib/python3.7/site-packages/behave_webdriver/steps/actions.py:16 2.003s
    Then I expect that element "h1" contains the text "Read the Docs"                   # venv/lib/python3.7/site-packages/behave_webdriver/steps/expectations.py:121 0.014s
      Assertion Failed: Element text does not contain "Read the Docs"
coreygans commented 5 years ago

nm, after a restart, it is working properly now