File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ Web design by [Evrone](https://evrone.com/), what else
40
40
* [ Navigation] ( https://github.com/rubycdp/ferrum#navigation )
41
41
* [ Finders] ( https://github.com/rubycdp/ferrum#finders )
42
42
* [ Screenshots] ( https://github.com/rubycdp/ferrum#screenshots )
43
+ * [ Cleaning Up] ( https://github.com/rubycdp/ferrum#cleaning-up )
43
44
* [ Network] ( https://github.com/rubycdp/ferrum#network )
44
45
* [ Mouse] ( https://github.com/rubycdp/ferrum#mouse )
45
46
* [ Keyboard] ( https://github.com/rubycdp/ferrum#keyboard )
@@ -407,6 +408,25 @@ browser.mhtml(path: "google.mhtml") # => 87742
407
408
```
408
409
409
410
411
+ ## Cleaning Up
412
+
413
+ #### reset
414
+
415
+ Closes browser tabs opened by the ` Browser ` instance.
416
+
417
+ ``` ruby
418
+ # connect to a long-running Chrome process
419
+ browser = Ferrum ::Browser .new (url: ' http://localhost:9222' )
420
+
421
+ browser.go_to(" https://github.com/" )
422
+
423
+ # clean up, lest the tab stays there hanging forever
424
+ browser.reset
425
+
426
+ browser.quit
427
+ ```
428
+
429
+
410
430
## Network
411
431
412
432
browser.network
You can’t perform that action at this time.
0 commit comments