appium_lib 0.18.0 → 0.18.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/docs/android_docs.md +122 -122
- data/docs/ios_docs.md +124 -124
- data/lib/appium_lib/android/helper.rb +1 -1
- data/lib/appium_lib/common/version.rb +2 -2
- data/lib/appium_lib/driver.rb +19 -14
- data/release_notes.md +7 -0
- metadata +2 -2
@@ -401,7 +401,7 @@ module Appium::Android
|
|
401
401
|
# Returns a string containing interesting elements.
|
402
402
|
# @return [String]
|
403
403
|
def get_inspect
|
404
|
-
@device ==
|
404
|
+
@device == 'Selendroid' ? get_selendroid_inspect : get_android_inspect
|
405
405
|
end
|
406
406
|
|
407
407
|
# Intended for use with console.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
module Appium
|
3
3
|
# Version and Date are defined on the 'Appium' module, not 'Appium::Common'
|
4
|
-
VERSION = '0.18.
|
5
|
-
DATE = '2014-01-
|
4
|
+
VERSION = '0.18.1' unless defined? ::Appium::VERSION
|
5
|
+
DATE = '2014-01-28' unless defined? ::Appium::DATE
|
6
6
|
end
|
data/lib/appium_lib/driver.rb
CHANGED
@@ -292,19 +292,24 @@ module Appium
|
|
292
292
|
|
293
293
|
@port = opts.fetch :port, ENV['PORT'] || 4723
|
294
294
|
|
295
|
-
#
|
296
|
-
#
|
295
|
+
# 'iPhone Simulator'
|
296
|
+
# 'iPad Simulator'
|
297
|
+
# 'Android'
|
298
|
+
# 'Selendroid'
|
297
299
|
#
|
298
|
-
# Android is always Android or Selendroid so there's no
|
299
|
-
# override required.
|
300
|
-
@device_cap = opts.fetch :device_cap, 'iPhone Simulator'
|
301
|
-
|
302
300
|
# :ios, :android, :selendroid
|
303
|
-
@device = opts
|
304
|
-
|
301
|
+
@device = opts[:device]
|
302
|
+
raise 'Device must be set' unless @device
|
303
|
+
|
304
|
+
@device = 'Android' if @device.to_s == 'android'
|
305
|
+
@device = 'Selendroid' if @device.to_s == 'selendroid'
|
306
|
+
@device = 'iPhone Simulator' if @device.to_s == 'ios'
|
307
|
+
|
308
|
+
raise 'Device must be set iPhone Simulator, iPad Simulator, Android' unless @device &&
|
309
|
+
['iPhone Simulator', 'iPad Simulator', 'Android', 'Selendroid'].include?(@device)
|
305
310
|
|
306
311
|
@version = opts[:version]
|
307
|
-
if @device ==
|
312
|
+
if @device == 'Android' || @device == 'Selendroid'
|
308
313
|
@version = '4.3' unless @version # default android to 4.3
|
309
314
|
else
|
310
315
|
@version = '7' unless @version # default ios to 7
|
@@ -315,7 +320,7 @@ module Appium
|
|
315
320
|
|
316
321
|
# load common methods
|
317
322
|
extend Appium::Common
|
318
|
-
if @device ==
|
323
|
+
if @device == 'Android'
|
319
324
|
raise 'APP_ACTIVITY must be set.' if @app_activity.nil?
|
320
325
|
|
321
326
|
# load Android specific methods
|
@@ -387,7 +392,7 @@ module Appium
|
|
387
392
|
compressXml: @compress_xml,
|
388
393
|
platform: 'Linux',
|
389
394
|
version: @version,
|
390
|
-
device: @device
|
395
|
+
device: @device,
|
391
396
|
:'device-type' => @device_type,
|
392
397
|
:'device-orientation' => @device_orientation,
|
393
398
|
name: @app_name || 'Ruby Console Android Appium',
|
@@ -404,7 +409,7 @@ module Appium
|
|
404
409
|
{
|
405
410
|
platform: 'OS X 10.9',
|
406
411
|
version: @version,
|
407
|
-
device: @
|
412
|
+
device: @device,
|
408
413
|
name: @app_name || 'Ruby Console iOS Appium',
|
409
414
|
:'device-orientation' => @device_orientation
|
410
415
|
}
|
@@ -412,7 +417,7 @@ module Appium
|
|
412
417
|
|
413
418
|
# @private
|
414
419
|
def capabilities
|
415
|
-
caps =
|
420
|
+
caps = ['iPhone Simulator', 'iPad Simulator'].include?(@device) ? ios_capabilities : android_capabilities
|
416
421
|
caps[:app] = absolute_app_path unless @app_path.nil? || @app_path.empty?
|
417
422
|
caps
|
418
423
|
end
|
@@ -507,7 +512,7 @@ module Appium
|
|
507
512
|
# Set timeout to a large number so that Appium doesn't quit
|
508
513
|
# when no commands are entered after 60 seconds.
|
509
514
|
# broken on selendroid: https://github.com/appium/appium/issues/513
|
510
|
-
mobile :setCommandTimeout, timeout: 9999 unless @device ==
|
515
|
+
mobile :setCommandTimeout, timeout: 9999 unless @device == 'Selendroid'
|
511
516
|
|
512
517
|
# Set implicit wait by default unless we're using Pry.
|
513
518
|
@driver.manage.timeouts.implicit_wait = @default_wait unless defined? Pry
|
data/release_notes.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
#### v0.18.0 2014-01-27
|
2
|
+
|
3
|
+
- [e0ea2f2](https://github.com/appium/ruby_lib/commit/e0ea2f2d77875b9ffc88d8649b3652c39a1ab51a) Release 0.18.0
|
4
|
+
- [c94bf57](https://github.com/appium/ruby_lib/commit/c94bf57dadf2049a3aace8ed35d978c1d4545be2) Update capabilities for Sauce
|
5
|
+
- [2859c83](https://github.com/appium/ruby_lib/commit/2859c831916ef1541fe2a283c9afc6af55e43a25) Update session id example
|
6
|
+
|
7
|
+
|
1
8
|
#### v0.17.0 2014-01-22
|
2
9
|
|
3
10
|
- [8571197](https://github.com/appium/ruby_lib/commit/8571197b04ea923db6e375bae808bf84dea52c98) Release 0.17.0
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appium_lib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.18.
|
4
|
+
version: 0.18.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- code@bootstraponline.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: selenium-webdriver
|