diff --git a/news/157.bugfix b/news/157.bugfix new file mode 100644 index 0000000..02e2de7 --- /dev/null +++ b/news/157.bugfix @@ -0,0 +1 @@ +Makes ``Wait For Then Click Element`` keyword more robust. @wesleybl diff --git a/src/plone/app/robotframework/selenium.robot b/src/plone/app/robotframework/selenium.robot index 6c3d2b1..154b224 100644 --- a/src/plone/app/robotframework/selenium.robot +++ b/src/plone/app/robotframework/selenium.robot @@ -101,8 +101,9 @@ Wait For Element ... Element must match exactly one time. [Arguments] ${element} Wait Until Page Contains Element ${element} - Set Focus To Element ${element} Wait Until Element Is Visible ${element} + Wait Until Element Is Enabled ${element} + Set Focus To Element ${element} Sleep 0.1 ${count} = Get Element Count ${element} Should Be Equal as Numbers ${count} 1 @@ -112,8 +113,9 @@ Wait For Elements ... Element may match more than once. [Arguments] ${element} Wait Until Page Contains Element ${element} - Set Focus To Element ${element} Wait Until Element Is Visible ${element} + Wait Until Element Is Enabled ${element} + Set Focus To Element ${element} Wait For Then Click Element [Documentation] Can contain css=, jquery=, or any other element selector.