Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion lib/appium_lib/driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,9 @@ def automation_name_is_xcuitest?
# If the Appium server is under REQUIRED_VERSION_XCUITEST, then error is raised.
# @return [Boolean]
def check_server_version_xcuitest
if automation_name_is_xcuitest? && (@appium_server_status['build']['version'] < REQUIRED_VERSION_XCUITEST)
if automation_name_is_xcuitest? &&
!@appium_server_status.empty? &&
(@appium_server_status['build']['version'] < REQUIRED_VERSION_XCUITEST)
raise Appium::Error::NotSupportedAppiumServer, "XCUITest requires Appium version >= #{REQUIRED_VERSION_XCUITEST}"
end
true
Expand All @@ -496,6 +498,10 @@ def check_server_version_xcuitest
# @return [Hash]
def appium_server_version
driver.remote_status
rescue Selenium::WebDriver::Error::WebDriverError => ex
raise unless ex.message.include?('content-type=""')
# server (TestObject for instance) does not respond to status call
{}
end

# Returns the client's version info
Expand Down