Skip to content

Commit

Permalink
Tests: sleep in 'Wait For Element' and 'Wait For Then Click Element'.
Browse files Browse the repository at this point in the history
After this sleep, check that the element in question is there only once.
Hopefully this will stabilize the Plone core robot tests.

See plone/Products.CMFPlone#3582
  • Loading branch information
mauritsvanrees committed Aug 9, 2022
1 parent f37416e commit 14b448f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions news/3582.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Tests: sleep in 'Wait For Element' and 'Wait For Then Click Element'.
After this sleep, check that the element in question is there only once.
Hopefully this will stabilize the Plone core robot tests.
[maurits]
6 changes: 6 additions & 0 deletions src/plone/app/robotframework/selenium.robot
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ Wait For Element
Wait Until Page Contains Element ${element}
Set Focus To Element ${element}
Wait Until Element Is Visible ${element}
Sleep 0.1
${count} = Get Element Count ${element}
Should Be Equal as Numbers ${count} 1

Wait For Then Click Element
[Documentation] Can contain css=, jquery=, or any other element selector.
Expand All @@ -115,6 +118,9 @@ Wait For Then Click Invisible Element
[Arguments] ${element}
Wait Until Page Contains Element ${element}
Set Focus To Element ${element}
Sleep 0.1
${count} = Get Element Count ${element}
Should Be Equal as Numbers ${count} 1
Click Element ${element}

# ----------------------------------------------------------------------------
Expand Down

0 comments on commit 14b448f

Please sign in to comment.