Skip to content

Commit

Permalink
[rb] Move common driver quit behavior to Common::Driver (#7318)
Browse files Browse the repository at this point in the history
  • Loading branch information
twalpole authored Jun 23, 2019
1 parent f8b35a3 commit 5eb1ed0
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 30 deletions.
6 changes: 0 additions & 6 deletions rb/lib/selenium/webdriver/chrome/driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@ def browser
:chrome
end

def quit
super
ensure
@service&.stop
end

def execute_cdp(cmd, **params)
@bridge.send_command(cmd: cmd, params: params)
end
Expand Down
2 changes: 2 additions & 0 deletions rb/lib/selenium/webdriver/common/driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ def page_source

def quit
bridge.quit
ensure
@service&.stop
end

#
Expand Down
6 changes: 0 additions & 6 deletions rb/lib/selenium/webdriver/edge_html/driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ def initialize(opts = {})
def browser
:edge
end

def quit
super
ensure
@service&.stop
end
end # Driver
end # Edge
end # WebDriver
Expand Down
6 changes: 0 additions & 6 deletions rb/lib/selenium/webdriver/firefox/driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ def initialize(opts = {})
def browser
:firefox
end

def quit
super
ensure
@service&.stop
end
end # Driver
end # Firefox
end # WebDriver
Expand Down
6 changes: 0 additions & 6 deletions rb/lib/selenium/webdriver/ie/driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ def initialize(opts = {})
def browser
:internet_explorer
end

def quit
super
ensure
@service&.stop
end
end # Driver
end # IE
end # WebDriver
Expand Down
6 changes: 0 additions & 6 deletions rb/lib/selenium/webdriver/safari/driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ def initialize(opts = {})
def browser
:safari
end

def quit
super
ensure
@service&.stop
end
end # Driver
end # Safari
end # WebDriver
Expand Down

0 comments on commit 5eb1ed0

Please sign in to comment.