File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ a block with this page, after which the page is closed.
13
13
- ` Ferrum::Browser ` supports new option ` :proxy ` https://github.com/rubycdp/ferrum#proxy
14
14
- ` Ferrum::Network::Response#params ` attr_reader added
15
15
- ` Ferrum::Node `
16
- - ` #selected ` check selected option
17
- - ` #select ` select option
16
+ - ` #selected ` checks selected options. Returns an array of ` Ferrum::Node ` that's selected.
17
+ - ` #select ` selects options by passed attribute, default: ` :value ` .
18
18
- ` #computed_style ` returns hash of computed styles
19
19
- ` Ferrum::JavaScriptError#stack_trace ` attr_reader
20
20
- Windows support
Original file line number Diff line number Diff line change @@ -1101,6 +1101,20 @@ frame.at_css("//a[text() = 'Log in']") # => Node
1101
1101
#### selected : ` Array<Node> `
1102
1102
#### select
1103
1103
1104
+ (chainable) Selects options by passed attribute.
1105
+
1106
+ ``` ruby
1107
+ browser.at_xpath(" //*[select]" ).select ([" 1" ]) # => Node (select)
1108
+ browser.at_xpath(" //*[select]" ).select ([" text" ], by: :text ) # => Node (select)
1109
+ ```
1110
+
1111
+ Accept string, array or strings:
1112
+ ``` ruby
1113
+ browser.at_xpath(" //*[select]" ).select (" 1" )
1114
+ browser.at_xpath(" //*[select]" ).select (" 1" , " 2" )
1115
+ browser.at_xpath(" //*[select]" ).select ([" 1" , " 2" ])
1116
+ ```
1117
+
1104
1118
1105
1119
## Thread safety ##
1106
1120
You can’t perform that action at this time.
0 commit comments