appium_lib 6.0.0 → 7.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.rubocop.yml +28 -0
- data/.travis.yml +10 -0
- data/Rakefile +9 -1
- data/android_tests/Gemfile +1 -1
- data/android_tests/Rakefile +20 -13
- data/android_tests/lib/android/specs/android/element/alert.rb +1 -1
- data/android_tests/lib/android/specs/android/element/button.rb +2 -2
- data/android_tests/lib/android/specs/android/element/generic.rb +1 -2
- data/android_tests/lib/android/specs/android/element/text.rb +2 -3
- data/android_tests/lib/android/specs/android/element/textfield.rb +2 -2
- data/android_tests/lib/android/specs/android/helper.rb +5 -3
- data/android_tests/lib/android/specs/android/patch.rb +2 -2
- data/android_tests/lib/android/specs/common/device.rb +16 -9
- data/android_tests/lib/android/specs/common/device_touchaction.rb +5 -2
- data/android_tests/lib/android/specs/common/element/window.rb +1 -1
- data/android_tests/lib/android/specs/common/helper.rb +14 -15
- data/android_tests/lib/android/specs/common/patch.rb +11 -9
- data/android_tests/lib/android/specs/common/version.rb +3 -3
- data/android_tests/lib/android/specs/common/web_context.rb +2 -3
- data/android_tests/lib/android/specs/driver.rb +38 -29
- data/android_tests/lib/android/specs/install.rb +3 -3
- data/android_tests/lib/format.rb +6 -8
- data/android_tests/lib/run.rb +25 -17
- data/android_tests/readme.md +4 -2
- data/appium_lib.gemspec +13 -11
- data/contributing.md +1 -1
- data/docs/android_docs.md +358 -274
- data/docs/ios_docs.md +333 -270
- data/docs/migration.md +10 -0
- data/docs_gen/make_docs.rb +3 -1
- data/ios_tests/Gemfile +1 -1
- data/ios_tests/Rakefile +17 -10
- data/ios_tests/appium.txt +1 -1
- data/ios_tests/lib/common.rb +8 -4
- data/ios_tests/lib/format.rb +5 -7
- data/ios_tests/lib/ios/specs/common/element/window.rb +1 -1
- data/ios_tests/lib/ios/specs/common/helper.rb +40 -39
- data/ios_tests/lib/ios/specs/common/patch.rb +15 -11
- data/ios_tests/lib/ios/specs/common/version.rb +3 -3
- data/ios_tests/lib/ios/specs/common/web_context.rb +1 -2
- data/ios_tests/lib/ios/specs/device/device.rb +7 -7
- data/ios_tests/lib/ios/specs/device/multi_touch.rb +6 -8
- data/ios_tests/lib/ios/specs/device/touch_actions.rb +12 -12
- data/ios_tests/lib/ios/specs/driver.rb +23 -22
- data/ios_tests/lib/ios/specs/ios/element/alert.rb +6 -2
- data/ios_tests/lib/ios/specs/ios/element/button.rb +2 -2
- data/ios_tests/lib/ios/specs/ios/element/generic.rb +1 -1
- data/ios_tests/lib/ios/specs/ios/element/text.rb +4 -1
- data/ios_tests/lib/ios/specs/ios/element/textfield.rb +6 -6
- data/ios_tests/lib/ios/specs/ios/helper.rb +5 -5
- data/ios_tests/lib/ios/specs/ios/patch.rb +2 -2
- data/ios_tests/lib/run.rb +1 -1
- data/ios_tests/readme.md +3 -3
- data/ios_tests/upload/sauce_storage.rb +8 -8
- data/ios_tests/upload/upload.rb +1 -1
- data/lib/appium_lib/android/client_xpath.rb +7 -7
- data/lib/appium_lib/android/element/alert.rb +2 -2
- data/lib/appium_lib/android/element/button.rb +16 -16
- data/lib/appium_lib/android/element/generic.rb +12 -13
- data/lib/appium_lib/android/element/text.rb +5 -5
- data/lib/appium_lib/android/element/textfield.rb +5 -5
- data/lib/appium_lib/android/helper.rb +82 -52
- data/lib/appium_lib/android/mobile_methods.rb +2 -2
- data/lib/appium_lib/android/patch.rb +3 -3
- data/lib/appium_lib/common/element/window.rb +1 -1
- data/lib/appium_lib/common/helper.rb +30 -35
- data/lib/appium_lib/common/patch.rb +22 -20
- data/lib/appium_lib/common/version.rb +3 -3
- data/lib/appium_lib/common/wait.rb +9 -10
- data/lib/appium_lib/device/device.rb +39 -33
- data/lib/appium_lib/device/multi_touch.rb +5 -7
- data/lib/appium_lib/device/touch_actions.rb +14 -15
- data/lib/appium_lib/driver.rb +97 -76
- data/lib/appium_lib/ios/element/alert.rb +1 -1
- data/lib/appium_lib/ios/element/button.rb +5 -5
- data/lib/appium_lib/ios/element/generic.rb +5 -6
- data/lib/appium_lib/ios/element/text.rb +5 -5
- data/lib/appium_lib/ios/element/textfield.rb +15 -15
- data/lib/appium_lib/ios/helper.rb +103 -90
- data/lib/appium_lib/ios/mobile_methods.rb +2 -2
- data/lib/appium_lib/ios/patch.rb +4 -4
- data/lib/appium_lib/logger.rb +7 -5
- data/lib/appium_lib/rails/duplicable.rb +3 -1
- data/readme.md +7 -1
- data/release_notes.md +152 -0
- metadata +28 -54
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 153536702ca868791ca4c3172f16b930d353bf9c
|
4
|
+
data.tar.gz: 950e645ff01a061f5353655e26703e0d92f69086
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7be0973ccbe79716693065e2c4068d40f9f3811cc128af6fde909982a6e846f5855e4fe8e7ad3b6bbf6fd000b02ab874a0e795560d4b36c1f740072eb069ed9b
|
7
|
+
data.tar.gz: 6ec9bc433e1dbd7e6c4bc0b04772ef8f1e7dc384febf08b5b6b000a7cd9df9800ff5fc8eb2595499712bb9e0b0b1ab1b54ac0a5d2613e2232c890bc6f32e4595
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# Custom config for RuboCop static code analysis
|
2
|
+
Metrics/LineLength:
|
3
|
+
Max: 125
|
4
|
+
Metrics/MethodLength:
|
5
|
+
Enabled: false
|
6
|
+
Metrics/ClassLength:
|
7
|
+
Enabled: false
|
8
|
+
Metrics/CyclomaticComplexity:
|
9
|
+
Enabled: false
|
10
|
+
Metrics/PerceivedComplexity:
|
11
|
+
Enabled: false
|
12
|
+
Metrics/AbcSize:
|
13
|
+
Enabled: false
|
14
|
+
Style/Documentation:
|
15
|
+
Enabled: false
|
16
|
+
Style/RegexpLiteral:
|
17
|
+
Enabled: false
|
18
|
+
Style/ConstantName:
|
19
|
+
Enabled: false
|
20
|
+
# blocked on https://github.com/appium/ruby_lib/issues/312
|
21
|
+
Style/GlobalVars:
|
22
|
+
Enabled: false
|
23
|
+
Style/AccessorMethodName:
|
24
|
+
Enabled: false
|
25
|
+
Style/DoubleNegation:
|
26
|
+
Enabled: false
|
27
|
+
Style/EachWithObject:
|
28
|
+
Enabled: false
|
data/.travis.yml
ADDED
data/Rakefile
CHANGED
@@ -3,6 +3,7 @@ require 'rubygems'
|
|
3
3
|
require 'rake'
|
4
4
|
require 'date'
|
5
5
|
require 'posix/spawn'
|
6
|
+
require 'rubocop/rake_task'
|
6
7
|
|
7
8
|
# Defines gem name.
|
8
9
|
def repo_name
|
@@ -226,4 +227,11 @@ end
|
|
226
227
|
desc 'Remove non-ascii bytes'
|
227
228
|
task :byte do
|
228
229
|
remove_non_ascii
|
229
|
-
end
|
230
|
+
end
|
231
|
+
|
232
|
+
desc 'Execute RuboCop static code analysis'
|
233
|
+
RuboCop::RakeTask.new(:rubocop) do |t|
|
234
|
+
t.patterns = %w(lib ios_tests android_tests)
|
235
|
+
t.options = %w(-D)
|
236
|
+
t.fail_on_error = true
|
237
|
+
end
|
data/android_tests/Gemfile
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
|
-
gemspec path: File.expand_path('../../', __FILE__) # __dir__ fails on 1.9
|
2
|
+
gemspec path: File.expand_path('../../', __FILE__) # __dir__ fails on 1.9
|
data/android_tests/Rakefile
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'rake'
|
3
|
+
require 'rubocop/rake_task'
|
3
4
|
|
4
|
-
task :
|
5
|
+
task default: :android
|
5
6
|
|
6
7
|
# Run sh and ignore exception
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
end
|
8
|
+
# rubocop:disable Lint/HandleExceptions
|
9
|
+
def run_sh(cmd)
|
10
|
+
sh cmd
|
11
|
+
rescue
|
12
12
|
end
|
13
13
|
|
14
14
|
# Run cmd. On failure run install and try again.
|
15
|
-
def bash
|
15
|
+
def bash(cmd)
|
16
16
|
sh cmd do |successful, result|
|
17
17
|
# exitstatus 7 means bundle install failed
|
18
18
|
# exitstatus 1 means the test failed
|
19
|
-
if !successful && result.exitstatus
|
19
|
+
if !successful && result.exitstatus == 7
|
20
20
|
Rake::Task['install'].execute
|
21
21
|
run_sh cmd
|
22
22
|
end
|
@@ -33,10 +33,10 @@ end
|
|
33
33
|
|
34
34
|
# rake android['single_text_name']
|
35
35
|
# rake android
|
36
|
-
def run_android
|
36
|
+
def run_android(test_file = nil)
|
37
37
|
wait_for_valid_device
|
38
38
|
cmd = 'bundle exec ruby ./lib/run.rb android'
|
39
|
-
cmd += %
|
39
|
+
cmd += %( "#{test_file}") if test_file
|
40
40
|
bash cmd
|
41
41
|
end
|
42
42
|
|
@@ -46,16 +46,23 @@ end
|
|
46
46
|
# Run all tests with:
|
47
47
|
# rake android
|
48
48
|
desc 'Run the Android tests'
|
49
|
-
task :android, :args, :test_file do |
|
49
|
+
task :android, :args, :test_file do |_args, test_file|
|
50
50
|
run_android test_file[:args]
|
51
51
|
end
|
52
52
|
|
53
53
|
desc 'Run the Android tests without uninstalling'
|
54
|
-
task :droid, :args, :test_file do |
|
54
|
+
task :droid, :args, :test_file do |_args, test_file|
|
55
55
|
run_android test_file[:args]
|
56
56
|
end
|
57
57
|
|
58
58
|
desc 'Run bundle install'
|
59
59
|
task :install do
|
60
60
|
sh 'bundle install'
|
61
|
-
end
|
61
|
+
end
|
62
|
+
|
63
|
+
desc 'Execute RuboCop static code analysis'
|
64
|
+
RuboCop::RakeTask.new(:rubocop) do |t|
|
65
|
+
t.patterns = %w(**/*.rb)
|
66
|
+
t.options = %w(-D)
|
67
|
+
t.fail_on_error = false
|
68
|
+
end
|
@@ -28,7 +28,7 @@ describe 'android/element/button' do
|
|
28
28
|
|
29
29
|
t 'buttons' do
|
30
30
|
exp = ['Zoom in', 'Modern zoom in', 'Thumbnail zoom']
|
31
|
-
wait { buttons('zoom').map
|
31
|
+
wait { buttons('zoom').map(&:text).must_equal exp }
|
32
32
|
wait { buttons.length.must_equal 6 }
|
33
33
|
end
|
34
34
|
|
@@ -49,4 +49,4 @@ describe 'android/element/button' do
|
|
49
49
|
end
|
50
50
|
|
51
51
|
t { after_last }
|
52
|
-
end
|
52
|
+
end
|
@@ -1,7 +1,6 @@
|
|
1
1
|
# rake android['android/element/text']
|
2
2
|
describe 'android/element/text' do
|
3
|
-
|
4
|
-
def must_raise_no_element &block
|
3
|
+
def must_raise_no_element(&block)
|
5
4
|
proc { block.call }.must_raise Selenium::WebDriver::Error::NoSuchElementError
|
6
5
|
end
|
7
6
|
|
@@ -33,4 +32,4 @@ describe 'android/element/text' do
|
|
33
32
|
t 'texts_exact' do
|
34
33
|
wait { texts_exact('API Demos').length.must_equal 1 }
|
35
34
|
end
|
36
|
-
end
|
35
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
describe 'android/element/textfield' do
|
2
|
-
def must_raise_no_element
|
2
|
+
def must_raise_no_element(&block)
|
3
3
|
proc { block.call }.must_raise Selenium::WebDriver::Error::NoSuchElementError
|
4
4
|
end
|
5
5
|
|
@@ -59,4 +59,4 @@ describe 'android/element/textfield' do
|
|
59
59
|
end
|
60
60
|
|
61
61
|
t { after_last }
|
62
|
-
end
|
62
|
+
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# rubocop:disable Metrics/LineLength
|
2
|
+
|
1
3
|
# rake android[android/helper]
|
2
4
|
describe 'android/helper' do
|
3
5
|
t 'tags' do
|
@@ -84,8 +86,8 @@ describe 'android/helper' do
|
|
84
86
|
['mFocusedApp=AppWindowToken{b40af858 token=Token{b3e2ce38 ActivityRecord{b3eb47d8 u0 io.appium.android.apis/.ApiDemos t6}}}',
|
85
87
|
'io.appium.android.apis',
|
86
88
|
'.ApiDemos'
|
87
|
-
# api 16 selendroid
|
88
89
|
],
|
90
|
+
# api 16 selendroid
|
89
91
|
['mFocusedApp=AppWindowToken{4157a2c8 token=Token{41582628 ActivityRecord{415821f0 com.android.launcher/com.android.launcher2.Launcher}}}',
|
90
92
|
'com.android.launcher',
|
91
93
|
'com.android.launcher2.Launcher'
|
@@ -94,10 +96,10 @@ describe 'android/helper' do
|
|
94
96
|
|
95
97
|
expected.each do |line, package, activity|
|
96
98
|
parsed = _parse_current_app_line(line)
|
97
|
-
|
99
|
+
fail "failed to parse #{line}" if parsed.nil?
|
98
100
|
parsed.package.must_equal package
|
99
101
|
parsed.activity.must_equal activity
|
100
102
|
parsed.am_start.must_equal package + '/' + activity
|
101
103
|
end
|
102
104
|
end
|
103
|
-
end
|
105
|
+
end
|
@@ -9,7 +9,7 @@ describe 'android/patch.rb' do
|
|
9
9
|
wait { first_textfield.type 'ok' }
|
10
10
|
wait { first_textfield.text.must_equal 'ok' }
|
11
11
|
|
12
|
-
#
|
12
|
+
# TODO: how to invoke random am start commands?
|
13
13
|
# nav to start activity
|
14
14
|
# io.appium.android.apis/.ApiDemos
|
15
15
|
|
@@ -24,4 +24,4 @@ describe 'android/patch.rb' do
|
|
24
24
|
back
|
25
25
|
wait { find('app') }
|
26
26
|
end
|
27
|
-
end
|
27
|
+
end
|
@@ -2,13 +2,13 @@
|
|
2
2
|
describe 'common/device' do
|
3
3
|
# Not yet implemented
|
4
4
|
t 'shake' do
|
5
|
-
#
|
5
|
+
# TODO: write test
|
6
6
|
end
|
7
7
|
|
8
8
|
t 'remove & install' do
|
9
|
-
#
|
10
|
-
#remove 'com.example.android.apis'
|
11
|
-
#install ENV['APP_PATH']
|
9
|
+
# TODO: write test
|
10
|
+
# remove 'com.example.android.apis'
|
11
|
+
# install ENV['APP_PATH']
|
12
12
|
end
|
13
13
|
|
14
14
|
t 'background_app' do
|
@@ -24,8 +24,8 @@ describe 'common/device' do
|
|
24
24
|
wait { current_activity.include?('Settings').must_equal true }
|
25
25
|
end
|
26
26
|
|
27
|
-
t '
|
28
|
-
wait {
|
27
|
+
t 'installed' do
|
28
|
+
wait { app_installed?('fake_app').must_equal false }
|
29
29
|
end
|
30
30
|
|
31
31
|
t 'reset' do
|
@@ -33,6 +33,13 @@ describe 'common/device' do
|
|
33
33
|
wait { text(1).text.must_equal 'API Demos' }
|
34
34
|
end
|
35
35
|
|
36
|
+
t 'device_locked?' do
|
37
|
+
lock 5
|
38
|
+
wait { device_locked?.must_equal true }
|
39
|
+
press_keycode 82
|
40
|
+
wait { device_locked?.must_equal false }
|
41
|
+
end
|
42
|
+
|
36
43
|
t 'close & launch' do
|
37
44
|
close_app
|
38
45
|
launch_app
|
@@ -43,10 +50,10 @@ describe 'common/device' do
|
|
43
50
|
end
|
44
51
|
|
45
52
|
t 'app_strings' do
|
46
|
-
wait_true { app_strings.
|
53
|
+
wait_true { app_strings.key? 'activity_save_restore' }
|
47
54
|
end
|
48
55
|
|
49
|
-
def must_return_element
|
56
|
+
def must_return_element(element)
|
50
57
|
element.class.must_equal Selenium::WebDriver::Element
|
51
58
|
end
|
52
59
|
|
@@ -103,4 +110,4 @@ describe 'common/device' do
|
|
103
110
|
data = pull_folder '/data/local/tmp'
|
104
111
|
data.length.must_be :>, 100
|
105
112
|
end
|
106
|
-
end
|
113
|
+
end
|
@@ -3,7 +3,7 @@ describe 'common/device_touchaction' do
|
|
3
3
|
t 'action_chain' do
|
4
4
|
wait do
|
5
5
|
e = find_element(:name, 'Accessibility')
|
6
|
-
Appium::TouchAction.new.press(:
|
6
|
+
Appium::TouchAction.new.press(element: e, x: 0.5, y: 0.5).release(element: e).perform
|
7
7
|
end
|
8
8
|
wait { find_element(:name, 'Custom View') }
|
9
9
|
back
|
@@ -13,6 +13,7 @@ describe 'common/device_touchaction' do
|
|
13
13
|
t 'swipe' do
|
14
14
|
wait { Appium::TouchAction.new.swipe(start_x: 0.75, start_y: 0.25, end_x: 0.75, end_y: 0.5, duration: 1.5).perform }
|
15
15
|
wait { !exists { text_exact 'NFC' } }
|
16
|
+
wait { text_exact 'Bouncing Balls' }
|
16
17
|
back
|
17
18
|
wait { text_exact 'NFC' }
|
18
19
|
end
|
@@ -25,5 +26,7 @@ describe 'common/device_touchaction' do
|
|
25
26
|
zoom 200
|
26
27
|
pinch 75
|
27
28
|
end
|
29
|
+
2.times { back }
|
30
|
+
wait { text_exact 'NFC' }
|
28
31
|
end
|
29
|
-
end
|
32
|
+
end
|
@@ -1,12 +1,10 @@
|
|
1
1
|
describe 'common/helper' do
|
2
2
|
wait_opts = { timeout: 0.2, interval: 0.2 } # max_wait, interval
|
3
3
|
|
4
|
-
|
5
|
-
There's no `must_not_raise` as the opposite of must_raise
|
4
|
+
# There's no `must_not_raise` as the opposite of must_raise
|
6
5
|
|
7
|
-
By default code is expected to not raise exceptions.
|
8
|
-
must_not_raise is a no-op.
|
9
|
-
=end
|
6
|
+
# By default code is expected to not raise exceptions.
|
7
|
+
# must_not_raise is a no-op.
|
10
8
|
|
11
9
|
# wait is a success unless an error is raised
|
12
10
|
# max_wait=0 is infinity to use 0.1
|
@@ -17,12 +15,12 @@ must_not_raise is a no-op.
|
|
17
15
|
wait(wait_opts) { nil }
|
18
16
|
|
19
17
|
# failed wait should error
|
20
|
-
proc { wait(wait_opts) {
|
18
|
+
proc { wait(wait_opts) { fail } }.must_raise Selenium::WebDriver::Error::TimeOutError
|
21
19
|
|
22
20
|
# regular rescue will not handle exceptions outside of StandardError hierarchy
|
23
21
|
# must rescue Exception explicitly to rescue everything
|
24
|
-
proc { wait(wait_opts) {
|
25
|
-
proc { wait(timeout: 0.2, interval: 0.0) {
|
22
|
+
proc { wait(wait_opts) { fail NoMemoryError } }.must_raise Selenium::WebDriver::Error::TimeOutError
|
23
|
+
proc { wait(timeout: 0.2, interval: 0.0) { fail NoMemoryError } }.must_raise Selenium::WebDriver::Error::TimeOutError
|
26
24
|
|
27
25
|
# invalid keys are rejected
|
28
26
|
proc { wait(invalidkey: 2) { true } }.must_raise RuntimeError
|
@@ -33,8 +31,8 @@ must_not_raise is a no-op.
|
|
33
31
|
ignore { true }
|
34
32
|
ignore { false }
|
35
33
|
ignore { nil }
|
36
|
-
ignore {
|
37
|
-
ignore {
|
34
|
+
ignore { fail }
|
35
|
+
ignore { fail NoMemoryError }
|
38
36
|
end
|
39
37
|
|
40
38
|
# wait_true is a success unless the value is not true
|
@@ -47,12 +45,13 @@ must_not_raise is a no-op.
|
|
47
45
|
proc { wait_true(wait_opts) { nil } }.must_raise Selenium::WebDriver::Error::TimeOutError
|
48
46
|
|
49
47
|
# raise should error
|
50
|
-
proc { wait_true(wait_opts) {
|
48
|
+
proc { wait_true(wait_opts) { fail } }.must_raise Selenium::WebDriver::Error::TimeOutError
|
51
49
|
|
52
50
|
# regular rescue will not handle exceptions outside of StandardError hierarchy
|
53
51
|
# must rescue Exception explicitly to rescue everything
|
54
|
-
proc { wait_true(wait_opts) {
|
55
|
-
proc { wait_true(timeout: 0.2, interval: 0.0) {
|
52
|
+
proc { wait_true(wait_opts) { fail NoMemoryError } }.must_raise Selenium::WebDriver::Error::TimeOutError
|
53
|
+
proc { wait_true(timeout: 0.2, interval: 0.0) { fail NoMemoryError } }
|
54
|
+
.must_raise Selenium::WebDriver::Error::TimeOutError
|
56
55
|
|
57
56
|
# invalid keys are rejected
|
58
57
|
proc { wait_true(invalidkey: 2) { true } }.must_raise RuntimeError
|
@@ -72,7 +71,7 @@ must_not_raise is a no-op.
|
|
72
71
|
end
|
73
72
|
|
74
73
|
t 'session_id' do
|
75
|
-
wait { session_id.must_match
|
74
|
+
wait { session_id.must_match(/\h{8}-\h{4}-\h{4}-\h{4}-\h{12}/) }
|
76
75
|
end
|
77
76
|
|
78
77
|
t 'xpath' do
|
@@ -110,4 +109,4 @@ must_not_raise is a no-op.
|
|
110
109
|
get_source.class.must_equal String
|
111
110
|
end
|
112
111
|
end
|
113
|
-
end
|
112
|
+
end
|
@@ -1,11 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
# rubocop:disable Lint/RescueException
|
2
|
+
# rubocop:disable Metrics/LineLength
|
3
|
+
|
4
|
+
# Skip:
|
5
|
+
# status # status patches are already tested in driver.rb
|
6
|
+
# raw_execute # debug output for Pry
|
7
|
+
|
6
8
|
describe 'common/patch' do
|
7
|
-
# Attributes are busted in Android.
|
8
|
-
# Blocked on https://github.com/appium/appium/issues/628
|
9
|
+
# Attributes are busted in Android.
|
10
|
+
# Blocked on https://github.com/appium/appium/issues/628
|
9
11
|
describe 'Selenium::WebDriver::Element methods' do
|
10
12
|
# Android supports exactly two string Attributes
|
11
13
|
# .name and .text
|
@@ -35,7 +37,7 @@ describe 'common/patch' do
|
|
35
37
|
begin
|
36
38
|
set_wait 0
|
37
39
|
find_element(:id, 'ok')
|
38
|
-
rescue Exception => e
|
40
|
+
rescue Exception => e
|
39
41
|
value = e.message
|
40
42
|
ensure
|
41
43
|
set_wait 30
|
@@ -66,4 +68,4 @@ describe 'common/patch' do
|
|
66
68
|
end
|
67
69
|
end
|
68
70
|
end
|
69
|
-
end
|
71
|
+
end
|