Skip to content

Commit 50b7b9c

Browse files
committed
country/creation/logic.txt: wait before dropdown appears before inspecting.
Correction for df0b728 commit.
1 parent df0b728 commit 50b7b9c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/test/robotframework/country/creation/logic.robot

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ Log Out
5353
Submit Form id=logout-form
5454

5555
Country Field Should Be
56-
[Documentation] Verify the selection of the select list that is using selectize.js
57-
[Arguments] ${value}
56+
[Documentation] Verify the selection of the select list that is using selectize.js
57+
[Arguments] ${value}
5858
# We can't use "List Selection Should Be" because
5959
# 1) it doesn't work with invisible elements (and selectize.js makes field invisible)
6060
# 2) selectize.js dynamically creates list of countries only when we're clicking on the field
61-
Click Element id=country-selectized
62-
${fieldXpath}= Set Variable
63-
... //*[contains(@class, "selectize-dropdown-content")]/*[text() = "${value}"]
64-
Xpath Should Match X Times xpath=${fieldXpath} expectedXpathCount=1
61+
Click Element id=country-selectized
62+
${dropdownXpath}= Set Variable //*[contains(@class, "selectize-dropdown-content")]
63+
Wait Until Page Contains Element xpath=${dropdownXpath}/*[contains(@class, "option")]
64+
Xpath Should Match X Times xpath=${dropdownXpath}/*[text() = "${value}"] expectedXpathCount=1

0 commit comments

Comments
 (0)