Files
appium/sample-code/ruby/spec/ios_create_session_spec.rb
Kazuaki Matsuo 974a8c3891 chore: Update sample in Ruby (#15062)
* docs: tweak platform-support in readme and platform-support page

* add you.i and flutter

* add section, tweak gecko, review

* test: update ruby sample

* fix android

* update readme

* remove unused gem
2021-01-27 17:45:04 +09:00

19 lines
600 B
Ruby

require 'spec_helper'
require 'appium_lib_core'
describe 'Create session' do
it 'should create and destroy IOS sessions' do
@driver = Appium::Core.for(ios_caps).start_driver
application_element = @driver.find_element :class_name, 'XCUIElementTypeApplication'
application_name = application_element.attribute :name
expect(application_name).to eq 'TestApp'
@driver.quit
expect {
application_element.attribute :name
}.to raise_error(Selenium::WebDriver::Error::InvalidSessionIdError,
'A session is either terminated or not started')
end
end