File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ drop down, and you can use "setSelected" to set something like an
84
84
option.click()
85
85
86
86
This will find the first "SELECT" element on the page, and cycle
87
- through each of it's OPTIONs in turn, printing out their values, and
87
+ through each of its OPTIONs in turn, printing out their values, and
88
88
selecting each in turn.
89
89
90
90
As you can see, this isn't the most efficient
@@ -104,12 +104,12 @@ WebDriver also provides features for deselecting all the selected options::
104
104
select = Select(driver.find_element_by_id('id'))
105
105
select.deselect_all()
106
106
107
- This will deselect all OPTIONs from the first SELECT on the page.
107
+ This will deselect all OPTIONs from that particular SELECT on the page.
108
108
109
109
Suppose in a test, we need the list of all default selected options, Select
110
110
class provides a property method that returns a list::
111
111
112
- select = Select(driver.find_element_by_xpath("xpath "))
112
+ select = Select(driver.find_element_by_xpath("//select[@name='name'] "))
113
113
all_selected_options = select.all_selected_options
114
114
115
115
To get all available options::
You can’t perform that action at this time.
0 commit comments