rubycdp / ferrum

Headless Chrome Ruby API
https://ferrum.rubycdp.com
MIT License
1.74k stars 123 forks source link

Protect against calling `.quit` on the browser object twice. #382

Closed postmodern closed 1 year ago

postmodern commented 1 year ago

Discovered that you can accidentally call .quit twice on the browser instance, and that causes the following exception:

/home/postmodern/test/ruby/bundler/vendor/bundle/ruby/3.2.0/gems/ferrum-0.13/lib/ferrum/browser.rb:240:in `quit': undefined method `close' for nil:NilClass (NoMethodError)

      @client.close
             ^^^^^^
    from test.rb:13:in `<main>'
route commented 1 year ago

Thank you!