Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c0ae2b0

Browse files
author
Wu Jiang
committed
Select.all_selected_options is a property
1 parent f2e1fa2 commit c0ae2b0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

source/navigating.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,14 @@ WebDriver also provides features for deselecting all the selected options::
108108
This will deselect all OPTIONs from the first SELECT on the page.
109109

110110
Suppose in a test, we need the list of all default selected options, Select
111-
class provides a method that returns a list::
111+
class provides a property method that returns a list::
112112

113113
select = Select(driver.find_element_by_xpath("xpath"))
114-
all_options = select.all_selected_options()
114+
all_selected_options = select.all_selected_options
115+
116+
To get all available options::
117+
118+
options = select.options
115119

116120
Once you've finished filling out the form, you probably want to submit
117121
it. One way to do this would be to find the "submit" button and click

0 commit comments

Comments
 (0)