File tree 1 file changed +7
-1
lines changed
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?
476
476
# If the Appium server is under REQUIRED_VERSION_XCUITEST, then error is raised.
477
477
# @return [Boolean]
478
478
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 )
480
482
raise Appium ::Error ::NotSupportedAppiumServer , "XCUITest requires Appium version >= #{ REQUIRED_VERSION_XCUITEST } "
481
483
end
482
484
true
@@ -496,6 +498,10 @@ def check_server_version_xcuitest
496
498
# @return [Hash]
497
499
def appium_server_version
498
500
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
+ { }
499
505
end
500
506
501
507
# Returns the client's version info
You can’t perform that action at this time.
0 commit comments