Files
appium/sample-code/ruby/spec/android_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

16 lines
534 B
Ruby

require 'spec_helper'
require 'appium_lib'
describe 'Create Android session' do
it 'should create and destroy Android sessions' do
@driver = Appium::Driver.new(android_caps, true).start_driver
@activity = @driver.current_activity
@pkg = @driver.current_package
expect("#{@pkg}#{@activity}").to eql 'io.appium.android.apis.ApiDemos'
@driver.quit
expect { @driver.current_package }.to raise_error(Selenium::WebDriver::Error::InvalidSessionIdError, 'A session is either terminated or not started')
end
end