Skip to content

Commit

Permalink
Add extra guard when terminating appium session app
Browse files Browse the repository at this point in the history
  • Loading branch information
Cawllec committed Nov 13, 2024
1 parent 502ac90 commit d2cfff3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/maze/hooks/appium_hooks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def after(scenario)
# commands from the previous scenario (in idempotent mode).
begin
Maze.driver.terminate_app Maze.driver.app_id
rescue Selenium::WebDriver::Error::UnknownError
rescue Selenium::WebDriver::Error::UnknownError, Selenium::WebDriver::Error::InvalidSessionIdError
if Maze.config.appium_version && Maze.config.appium_version.to_f < 2.0
$logger.warn 'terminate_app failed, using the slower but more forceful close_app instead'
Maze.driver.close_app
Expand Down

0 comments on commit d2cfff3

Please sign in to comment.