File tree Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -234,12 +234,23 @@ browser.go_to("https://github.com/")
234
234
browser.stop
235
235
```
236
236
237
- #### position
237
+ #### position = \*\* options
238
238
239
- Set the position for the browser window bounds
239
+ Set the position for the browser window
240
+
241
+ * options ` Hash `
242
+ * : left ` Integer `
243
+ * : top ` Integer `
240
244
241
245
``` ruby
242
246
browser.position = { left: 10 , top: 20 }
247
+ ```
248
+
249
+ #### position : ` Array<Integer> `
250
+
251
+ Get the position for the browser window
252
+
253
+ ``` ruby
243
254
browser.position # => [10, 20]
244
255
```
245
256
Original file line number Diff line number Diff line change @@ -126,10 +126,11 @@ module Ferrum
126
126
end
127
127
128
128
it "allows the window to be positioned" do
129
- expect ( browser . position ) . to eq ( [ 0 , 0 ] )
130
- expect { browser . position = { left : 10 , top : 20 } } .
131
- to change { browser . position }
132
- expect ( browser . position ) . to eq ( [ 10 , 20 ] )
129
+ expect {
130
+ browser . position = { left : 10 , top : 20 }
131
+ } . to change {
132
+ browser . position
133
+ } . from ( [ 0 , 0 ] ) . to ( [ 10 , 20 ] )
133
134
end
134
135
135
136
it "allows the page to be scrolled" do
You can’t perform that action at this time.
0 commit comments