File tree Expand file tree Collapse file tree 2 files changed +16
-15
lines changed Expand file tree Collapse file tree 2 files changed +16
-15
lines changed Original file line number Diff line number Diff line change @@ -23,3 +23,18 @@ Emailfield Value Should Be
23
23
[Arguments] ${locator } ${expected }
24
24
${value } = Get Value ${locator }
25
25
Should Be Equal ${expected } ${value }
26
+
27
+ Select Country
28
+ [Documentation] Select the given value in a select list that is using selectize.js
29
+ [Arguments] ${value }
30
+ # We can't use "Select From List By Label" because
31
+ # 1) it doesn't work with invisible elements (and selectize.js makes field invisible)
32
+ # 2) selectize.js dynamically creates list of countries only when we're clicking on the field
33
+ Click Element id=country-selectized
34
+ ${countryOption } = Catenate SEPARATOR=/
35
+ ... //*[contains(@class, "selectize-control")]
36
+ ... *[contains(@class, "selectize-dropdown")]
37
+ ... *[contains(@class, "selectize-dropdown-content")]
38
+ ... *[contains(@class, "option") and text()="${value } "]
39
+ Wait Until Page Contains Element xpath=${countryOption }
40
+ Click Element xpath=${countryOption }
Original file line number Diff line number Diff line change 2
2
Documentation Verify series creation scenarios from admin
3
3
Library SeleniumLibrary
4
4
Resource ../../auth.steps.robot
5
+ Resource ../../selenium.utils.robot
5
6
Suite Setup Before Test Suite
6
7
Suite Teardown After Test Suite
7
8
Test Setup Before Test
@@ -82,18 +83,3 @@ Before Test
82
83
After Test Suite
83
84
Log Out
84
85
Close Browser
85
-
86
- Select Country
87
- [Documentation] Select the given value in a select list that is using selectize.js
88
- [Arguments] ${value }
89
- # We can't use "Select From List By Label" because
90
- # 1) it doesn't work with invisible elements (and selectize.js makes field invisible)
91
- # 2) selectize.js dynamically creates list of countries only when we're clicking on the field
92
- Click Element id=country-selectized
93
- ${countryOption } = Catenate SEPARATOR=/
94
- ... //*[contains(@class, "selectize-control")]
95
- ... *[contains(@class, "selectize-dropdown")]
96
- ... *[contains(@class, "selectize-dropdown-content")]
97
- ... *[contains(@class, "option") and text()="${value } "]
98
- Wait Until Page Contains Element xpath=${countryOption }
99
- Click Element xpath=${countryOption }
You can’t perform that action at this time.
0 commit comments