ios_tests/lib/ios/specs/driver.rb in appium_lib-8.2.1 vs ios_tests/lib/ios/specs/driver.rb in appium_lib-9.0.0
- old
+ new
@@ -34,11 +34,12 @@
t 'verify all attributes' do
2.times { set_wait 30 } # must set twice to validate last_waits
actual = driver_attributes
actual[:caps][:app] = File.basename actual[:caps][:app]
expected = { caps: { platformName: 'ios',
- platformVersion: '9.3',
+ platformVersion: '10.1',
+ automationName: 'XCUITest',
deviceName: 'iPhone Simulator',
app: 'UICatalog.app' },
custom_url: false,
export_session: false,
default_wait: 30,
@@ -143,13 +144,17 @@
restart
text 'buttons'
end
t 'driver' do
- driver.browser.must_equal :iOS
+ driver.browser.must_be_empty
end
+ t 'automation_name_is_xcuitest?' do
+ automation_name_is_xcuitest?.must_equal UI::Inventory.xcuitest?
+ end
+
#
# Skip:
# screenshot # this is slow and already tested by Appium
# driver_quit # tested by restart
# start_driver # tested by restart
@@ -186,33 +191,32 @@
exists(0, 0) { fail 'error' }.must_equal false
end
# simple integration sanity test to check for unexpected exceptions
t 'set_location' do
+ fail NotImplementedError, "XCUITest(Appium1.6.2) doesn't support yet" if UI::Inventory.xcuitest?
set_location latitude: 55, longitude: -72, altitude: 33
end
- # any script
- t 'execute_script' do
- execute_script %q(au.mainApp().getFirstWithPredicate("name contains[c] 'button'");)
- end
-
# any elements
t 'find_elements' do
- find_elements(:class, 'UIATableCell').length.must_equal 12
+ find_elements(:class, UI::Inventory.table_cell).length.must_equal 12
end
# any element
t 'find_element' do
- find_element(:class, 'UIAStaticText').class.must_equal Selenium::WebDriver::Element
+ find_element(:class, UI::Inventory.static_text).class.must_equal Selenium::WebDriver::Element
end
# settings
t 'get settings' do
+ fail NotImplementedError, "XCUITest(Appium1.6.2) doesn't support yet" if UI::Inventory.xcuitest?
get_settings.wont_be_nil
end
t 'update settings' do
+ fail NotImplementedError, "XCUITest(Appium1.6.2) doesn't support yet" if UI::Inventory.xcuitest?
+
update_settings cyberdelia: 'open'
get_settings['cyberdelia'].must_equal 'open'
end
# Skip: x # x is only used in Pry