File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -476,7 +476,9 @@ def automation_name_is_xcuitest?
476476 # If the Appium server is under REQUIRED_VERSION_XCUITEST, then error is raised.
477477 # @return [Boolean]
478478 def check_server_version_xcuitest
479- if automation_name_is_xcuitest? && ( @appium_server_status [ 'build' ] [ 'version' ] < REQUIRED_VERSION_XCUITEST )
479+ if automation_name_is_xcuitest? &&
480+ !@appium_server_status . empty? &&
481+ ( @appium_server_status [ 'build' ] [ 'version' ] < REQUIRED_VERSION_XCUITEST )
480482 raise Appium ::Error ::NotSupportedAppiumServer , "XCUITest requires Appium version >= #{ REQUIRED_VERSION_XCUITEST } "
481483 end
482484 true
@@ -496,6 +498,10 @@ def check_server_version_xcuitest
496498 # @return [Hash]
497499 def appium_server_version
498500 driver . remote_status
501+ rescue Selenium ::WebDriver ::Error ::WebDriverError => ex
502+ raise unless ex . message . include? ( 'content-type=""' )
503+ # server (TestObject for instance) does not respond to status call
504+ { }
499505 end
500506
501507 # Returns the client's version info
You can’t perform that action at this time.
0 commit comments