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
@@ -1,9 +1,9 @@
|
|
1
1
|
describe 'version.rb' do
|
2
2
|
t '::Appium::VERSION' do
|
3
|
-
::Appium::VERSION.must_match
|
3
|
+
::Appium::VERSION.must_match(/(\d+)\.(\d+).(\d+)/)
|
4
4
|
end
|
5
5
|
|
6
6
|
t '::Appium::DATE' do
|
7
|
-
::Appium::DATE.must_match
|
7
|
+
::Appium::DATE.must_match(/(\d+)\-(\d+)\-(\d+)/)
|
8
8
|
end
|
9
|
-
end
|
9
|
+
end
|
@@ -1,7 +1,6 @@
|
|
1
1
|
# Tests specifically for areas where the web_context differs in behaviour
|
2
2
|
# rake android[common/web_context]
|
3
3
|
describe 'the web context' do
|
4
|
-
|
5
4
|
# appium's context support is broken on android
|
6
5
|
|
7
6
|
t 'available_contexts' do
|
@@ -28,7 +27,7 @@ describe 'the web context' do
|
|
28
27
|
|
29
28
|
if webview_context.nil?
|
30
29
|
undo_setcontext_nav
|
31
|
-
|
30
|
+
fail "No webview context found. contexts are: #{contexts}"
|
32
31
|
end
|
33
32
|
|
34
33
|
wait { set_context webview_context }
|
@@ -58,4 +57,4 @@ describe 'the web context' do
|
|
58
57
|
wait { set_context 'NATIVE_APP' }
|
59
58
|
wait { current_context.must_equal 'NATIVE_APP' }
|
60
59
|
end
|
61
|
-
end
|
60
|
+
end
|
@@ -1,6 +1,8 @@
|
|
1
|
+
# rubocop:disable Lint/RescueException
|
2
|
+
|
1
3
|
# rake android[driver]
|
2
4
|
describe 'driver' do
|
3
|
-
def
|
5
|
+
def sauce?
|
4
6
|
ENV['UPLOAD_FILE'] && ENV['SAUCE_USERNAME']
|
5
7
|
end
|
6
8
|
|
@@ -35,7 +37,7 @@ describe 'driver' do
|
|
35
37
|
app: 'api.apk',
|
36
38
|
appPackage: 'io.appium.android.apis',
|
37
39
|
appActivity: '.ApiDemos',
|
38
|
-
deviceName: 'Nexus 7'
|
40
|
+
deviceName: 'Nexus 7' },
|
39
41
|
custom_url: false,
|
40
42
|
export_session: false,
|
41
43
|
default_wait: 1,
|
@@ -44,7 +46,7 @@ describe 'driver' do
|
|
44
46
|
sauce_access_key: nil,
|
45
47
|
port: 4723,
|
46
48
|
device: :android,
|
47
|
-
debug: true
|
49
|
+
debug: true }
|
48
50
|
|
49
51
|
if actual != expected
|
50
52
|
diff = HashDiff.diff expected, actual
|
@@ -59,21 +61,16 @@ describe 'driver' do
|
|
59
61
|
end
|
60
62
|
|
61
63
|
describe 'Appium::Driver' do
|
62
|
-
t '@@loaded' do
|
63
|
-
loaded = $driver.class.class_variable_get :@@loaded
|
64
|
-
loaded.must_equal true
|
65
|
-
end
|
66
|
-
|
67
64
|
t '$driver.class' do
|
68
65
|
$driver.class.must_equal Appium::Driver
|
69
66
|
end
|
70
67
|
|
71
68
|
t 'absolute_app_path' do
|
72
|
-
def absolute_app_path
|
73
|
-
$driver.class.absolute_app_path(
|
69
|
+
def absolute_app_path(path)
|
70
|
+
$driver.class.absolute_app_path(caps: { app: path })
|
74
71
|
end
|
75
72
|
|
76
|
-
def validate_path
|
73
|
+
def validate_path(path)
|
77
74
|
absolute_app_path(path).must_equal path
|
78
75
|
end
|
79
76
|
|
@@ -123,19 +120,18 @@ describe 'driver' do
|
|
123
120
|
|
124
121
|
t 'server_version' do
|
125
122
|
server_version = appium_server_version['build']['version']
|
126
|
-
if
|
123
|
+
if sauce?
|
127
124
|
server_version.must_match 'Sauce OnDemand'
|
128
125
|
else
|
129
|
-
server_version.must_match
|
126
|
+
server_version.must_match(/(\d+)\.(\d+).(\d+)/)
|
130
127
|
end
|
131
128
|
end
|
132
129
|
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
=end
|
130
|
+
# Skip:
|
131
|
+
# ios_capabilities # save for iOS tests
|
132
|
+
# absolute_app_path # tested already by starting the driver for this test
|
133
|
+
# server_url # sauce labs only
|
134
|
+
|
139
135
|
t 'restart' do
|
140
136
|
set_wait 1 # ensure wait is 1 before we restart.
|
141
137
|
restart
|
@@ -146,15 +142,14 @@ describe 'driver' do
|
|
146
142
|
driver.browser.must_equal :Android
|
147
143
|
end
|
148
144
|
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
=end
|
145
|
+
# Skip:
|
146
|
+
# screenshot # this is slow and already tested by Appium
|
147
|
+
# driver_quit # tested by restart
|
148
|
+
# start_driver # tested by restart
|
149
|
+
# no_wait # posts value to server, it's not stored locally
|
150
|
+
# set_wait # posts value to server, it's not stored locally
|
151
|
+
# execute_script # 'mobile: ' is deprecated and plain executeScript unsupported
|
152
|
+
|
158
153
|
t 'default_wait' do
|
159
154
|
set_wait 1
|
160
155
|
default_wait.must_equal 1
|
@@ -163,7 +158,7 @@ describe 'driver' do
|
|
163
158
|
# returns true unless an error is raised
|
164
159
|
t 'exists' do
|
165
160
|
exists(0, 0) { true }.must_equal true
|
166
|
-
exists(0, 0) {
|
161
|
+
exists(0, 0) { fail 'error' }.must_equal false
|
167
162
|
end
|
168
163
|
|
169
164
|
# any elements
|
@@ -180,6 +175,20 @@ describe 'driver' do
|
|
180
175
|
end
|
181
176
|
end
|
182
177
|
|
178
|
+
# simple integration sanity test to check for unexpected exceptions
|
179
|
+
t 'set_location' do
|
180
|
+
begin
|
181
|
+
set_location latitude: 55, longitude: -72, altitude: 33
|
182
|
+
rescue Selenium::WebDriver::Error::UnknownError => e
|
183
|
+
# on android this method is expected to fail with this message when running
|
184
|
+
# on a regular device, or on genymotion.
|
185
|
+
# error could be many messages, including:
|
186
|
+
# ERROR running Appium command: port should be a number or string
|
187
|
+
# ERROR running Appium command: port should be > 0 and < 65536
|
188
|
+
raise unless e.message.include?('ERROR running Appium command: port should be')
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
183
192
|
# settings
|
184
193
|
t 'get settings' do
|
185
194
|
get_settings.wont_be_nil
|
@@ -5,11 +5,11 @@ describe 'install' do
|
|
5
5
|
end
|
6
6
|
|
7
7
|
def installed
|
8
|
-
|
8
|
+
app_installed?(pkg).must_equal true
|
9
9
|
end
|
10
10
|
|
11
11
|
def not_installed
|
12
|
-
|
12
|
+
app_installed?(pkg).must_equal false
|
13
13
|
end
|
14
14
|
|
15
15
|
t 'install/uninstall' do
|
@@ -23,4 +23,4 @@ describe 'install' do
|
|
23
23
|
# no way to launch apk after it's uninstalled/installed
|
24
24
|
# blocked on: https://github.com/appium/appium/issues/2969
|
25
25
|
# launch_app
|
26
|
-
end
|
26
|
+
end
|
data/android_tests/lib/format.rb
CHANGED
@@ -26,7 +26,7 @@ list = <<TXT
|
|
26
26
|
TXT
|
27
27
|
|
28
28
|
list.split("\n").each do |method|
|
29
|
-
pair = method.match
|
29
|
+
pair = method.match(/"([^"]+)"[^"]+"([^"]+)"/)
|
30
30
|
tag = pair[1]
|
31
31
|
klass = pair[2]
|
32
32
|
|
@@ -39,11 +39,9 @@ list.split("\n").each do |method|
|
|
39
39
|
puts line2
|
40
40
|
end
|
41
41
|
|
42
|
-
=begin
|
43
42
|
# for Pry
|
44
|
-
class Object
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
end
|
49
|
-
=end
|
43
|
+
# class Object
|
44
|
+
# def must_equal b
|
45
|
+
# raise 'not equal' unless self == b
|
46
|
+
# end
|
47
|
+
# end
|
data/android_tests/lib/run.rb
CHANGED
@@ -4,44 +4,51 @@ require 'fakefs/safe'
|
|
4
4
|
require 'hashdiff'
|
5
5
|
require_relative '../../lib/appium_lib'
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
ruby run.rb android
|
7
|
+
# Run all Android tests:
|
8
|
+
# ruby run.rb android
|
10
9
|
|
11
|
-
Run only the view album test:
|
12
|
-
|
13
|
-
|
10
|
+
# Run only the view album test:
|
11
|
+
# ruby run.rb ios view_album
|
12
|
+
|
13
|
+
def start_driver(caps)
|
14
|
+
driver = Appium::Driver.new(caps)
|
15
|
+
# Tests expect methods defined on the minispec object
|
16
|
+
Appium.promote_appium_methods ::Minitest::Spec
|
17
|
+
driver.start_driver
|
18
|
+
end
|
14
19
|
|
15
20
|
# Sanity check
|
16
21
|
a = OpenStruct.new x: 'ok'
|
17
|
-
|
22
|
+
fail 'x issue' unless a.x == 'ok'
|
18
23
|
|
19
24
|
appium_txt = File.expand_path(File.join(Dir.pwd, 'lib'))
|
20
25
|
dir = appium_txt
|
21
26
|
device = ARGV[0].downcase.strip
|
22
|
-
devices = %w
|
23
|
-
|
27
|
+
devices = %w(android selendroid ios)
|
28
|
+
fail 'Expected android, selendroid or ios as first argument' unless devices.include? device
|
24
29
|
|
25
30
|
one_test = ARGV[1]
|
26
31
|
test_dir = "/#{device}/"
|
27
32
|
|
28
33
|
caps = Appium.load_appium_txt file: appium_txt, verbose: true
|
29
|
-
caps = caps.merge(
|
34
|
+
caps = caps.merge(appium_lib: { debug: true, wait: 1 })
|
30
35
|
caps[:app] = ENV['SAUCE_PATH'] if ENV['SAUCE_USERNAME'] && ENV['SAUCE_ACCESS_KEY']
|
31
36
|
|
32
37
|
trace_files = []
|
33
38
|
|
34
39
|
if one_test
|
35
|
-
|
40
|
+
if File.exist? one_test
|
41
|
+
one_test = File.expand_path one_test
|
42
|
+
else
|
36
43
|
# ensure ext is .rb
|
37
44
|
one_test = File.join(File.dirname(one_test),
|
38
45
|
File.basename(one_test, '.*') + '.rb')
|
39
46
|
one_test = File.join(dir, test_dir + 'specs/', one_test)
|
40
|
-
else
|
41
|
-
one_test = File.expand_path one_test
|
42
47
|
end
|
43
|
-
|
44
|
-
|
48
|
+
|
49
|
+
fail "\nTest #{one_test} does not exist.\n" unless File.exist?(one_test)
|
50
|
+
start_driver(caps)
|
51
|
+
|
45
52
|
# require support (common.rb)
|
46
53
|
Dir.glob(File.join dir, test_dir + '/*.rb') do |test|
|
47
54
|
require test
|
@@ -58,7 +65,8 @@ else
|
|
58
65
|
puts " #{File.basename(test, '.*')}"
|
59
66
|
require test
|
60
67
|
end
|
61
|
-
|
68
|
+
|
69
|
+
start_driver(caps)
|
62
70
|
end
|
63
71
|
|
64
72
|
trace_files.map! do |f|
|
@@ -71,4 +79,4 @@ end
|
|
71
79
|
# Exit after tests.
|
72
80
|
Minitest.after_run { $driver.x if $driver }
|
73
81
|
# Run Minitest. Provide test file array for tracing.
|
74
|
-
Minitest.run_specs(
|
82
|
+
Minitest.run_specs(trace: trace_files)
|
data/android_tests/readme.md
CHANGED
@@ -20,8 +20,10 @@ api.apk is from [appium/android-apidemos](https://github.com/appium/android-apid
|
|
20
20
|
|
21
21
|
--
|
22
22
|
|
23
|
+
These results are run against Intel HAXM emulator (Nexus 7, Android 5.0.1, API 21)
|
24
|
+
|
23
25
|
```java
|
24
|
-
Finished in 2 mins
|
26
|
+
Finished in 2 mins 57 secs
|
25
27
|
|
26
|
-
|
28
|
+
106 runs, 144 assertions, 0 failures, 0 errors, 0 skips
|
27
29
|
```
|
data/appium_lib.gemspec
CHANGED
@@ -14,19 +14,21 @@ Gem::Specification.new do |s|
|
|
14
14
|
s.homepage = 'https://github.com/appium/ruby_lib' # published as appium_lib
|
15
15
|
s.require_paths = ['lib']
|
16
16
|
|
17
|
-
s.add_runtime_dependency 'selenium-webdriver', '~> 2.
|
18
|
-
s.add_runtime_dependency 'awesome_print', '~> 1.6'
|
19
|
-
s.add_runtime_dependency 'json', '~> 1.8'
|
20
|
-
s.add_runtime_dependency 'toml', '~> 0.0'
|
21
|
-
s.add_runtime_dependency 'nokogiri', '~> 1.6.
|
17
|
+
s.add_runtime_dependency 'selenium-webdriver', '~> 2.45'
|
18
|
+
s.add_runtime_dependency 'awesome_print', '~> 1.6'
|
19
|
+
s.add_runtime_dependency 'json', '~> 1.8'
|
20
|
+
s.add_runtime_dependency 'toml', '~> 0.0'
|
21
|
+
s.add_runtime_dependency 'nokogiri', '~> 1.6.6'
|
22
22
|
|
23
|
-
s.add_development_dependency 'posix-spawn', '~> 0.3'
|
24
|
-
s.add_development_dependency 'hashdiff', '~> 0.2.
|
23
|
+
s.add_development_dependency 'posix-spawn', '~> 0.3'
|
24
|
+
s.add_development_dependency 'hashdiff', '~> 0.2.2'
|
25
25
|
s.add_development_dependency 'spec', '~> 5.3.4'
|
26
|
-
s.add_development_dependency 'fakefs', '~> 0.
|
26
|
+
s.add_development_dependency 'fakefs', '~> 0.6.7'
|
27
27
|
|
28
|
-
s.add_development_dependency 'rake', '~> 10.
|
29
|
-
s.add_development_dependency 'yard', '~> 0.8'
|
28
|
+
s.add_development_dependency 'rake', '~> 10.4'
|
29
|
+
s.add_development_dependency 'yard', '~> 0.8'
|
30
|
+
|
31
|
+
s.add_development_dependency 'rubocop', '~> 0.30.1'
|
30
32
|
|
31
33
|
s.files = `git ls-files`.split "\n"
|
32
|
-
end
|
34
|
+
end
|
data/contributing.md
CHANGED
@@ -10,7 +10,7 @@ For features or bug fixes, please submit a pull request. Ideally there would be
|
|
10
10
|
|
11
11
|
### Run iOS tests
|
12
12
|
|
13
|
-
iOS tests are run on the iPhone 6 / iOS 8.
|
13
|
+
iOS tests are run on the iPhone 6 / iOS 8.3 simulator.
|
14
14
|
|
15
15
|
- `cd ios_tests`
|
16
16
|
- `flake 3 ios` - Run all the iOS tests up to 3 times
|
data/docs/android_docs.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
##### [load_appium_txt](https://github.com/appium/ruby_lib/blob/
|
1
|
+
##### [load_appium_txt](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L70)
|
2
2
|
|
3
|
-
> def self.load_appium_txt
|
3
|
+
> def self.load_appium_txt(opts = {})
|
4
4
|
|
5
5
|
Load appium.txt (toml format)
|
6
6
|
the basedir of this file + appium.txt is what's used
|
@@ -27,9 +27,9 @@ __Returns:__
|
|
27
27
|
|
28
28
|
--
|
29
29
|
|
30
|
-
##### [symbolize_keys](https://github.com/appium/ruby_lib/blob/
|
30
|
+
##### [symbolize_keys](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L139)
|
31
31
|
|
32
|
-
> def self.symbolize_keys
|
32
|
+
> def self.symbolize_keys(hash)
|
33
33
|
|
34
34
|
convert all keys (including nested) to symbols
|
35
35
|
|
@@ -38,9 +38,17 @@ https://github.com/rails/docrails/blob/a3b1105ada3da64acfa3843b164b14b734456a50/
|
|
38
38
|
|
39
39
|
--
|
40
40
|
|
41
|
-
##### [promote_singleton_appium_methods](https://github.com/appium/ruby_lib/blob/
|
41
|
+
##### [promote_singleton_appium_methods](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L160)
|
42
42
|
|
43
|
-
> def self.promote_singleton_appium_methods
|
43
|
+
> def self.promote_singleton_appium_methods(modules)
|
44
|
+
|
45
|
+
This method is intended to work with page objects that share
|
46
|
+
a common module. For example, Page::HomePage, Page::SignIn
|
47
|
+
those could be promoted on with Appium.promote_singleton_appium_methods Page
|
48
|
+
|
49
|
+
If you are promoting on an individual class then you should use
|
50
|
+
Appium.promote_appium_methods instead. The singleton method is intended
|
51
|
+
only for the shared module use case.
|
44
52
|
|
45
53
|
if modules is a module instead of an array, then the constants of
|
46
54
|
that module are promoted on.
|
@@ -48,9 +56,9 @@ otherwise, the array of modules will be used as the promotion target.
|
|
48
56
|
|
49
57
|
--
|
50
58
|
|
51
|
-
##### [promote_appium_methods](https://github.com/appium/ruby_lib/blob/
|
59
|
+
##### [promote_appium_methods](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L211)
|
52
60
|
|
53
|
-
> def self.promote_appium_methods
|
61
|
+
> def self.promote_appium_methods(class_array)
|
54
62
|
|
55
63
|
Promote appium methods to class instance methods
|
56
64
|
|
@@ -60,13 +68,25 @@ To promote methods to all classes:
|
|
60
68
|
Appium.promote_appium_methods Object
|
61
69
|
```
|
62
70
|
|
71
|
+
It's better to promote on specific classes instead of Object
|
72
|
+
|
73
|
+
```ruby
|
74
|
+
# promote on rspec
|
75
|
+
Appium.promote_appium_methods RSpec::Core::ExampleGroup
|
76
|
+
```
|
77
|
+
|
78
|
+
```ruby
|
79
|
+
# promote on minispec
|
80
|
+
Appium.promote_appium_methods Minitest::Spec
|
81
|
+
```
|
82
|
+
|
63
83
|
__Parameters:__
|
64
84
|
|
65
85
|
[Array<Class>] class_array - An array of classes
|
66
86
|
|
67
87
|
--
|
68
88
|
|
69
|
-
##### [global_webdriver_http_sleep](https://github.com/appium/ruby_lib/blob/
|
89
|
+
##### [global_webdriver_http_sleep](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L245)
|
70
90
|
|
71
91
|
> def global_webdriver_http_sleep
|
72
92
|
|
@@ -74,7 +94,7 @@ The amount to sleep in seconds before every webdriver http call.
|
|
74
94
|
|
75
95
|
--
|
76
96
|
|
77
|
-
##### [global_webdriver_http_sleep=](https://github.com/appium/ruby_lib/blob/
|
97
|
+
##### [global_webdriver_http_sleep=](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L245)
|
78
98
|
|
79
99
|
> def global_webdriver_http_sleep=(value)
|
80
100
|
|
@@ -82,7 +102,7 @@ The amount to sleep in seconds before every webdriver http call.
|
|
82
102
|
|
83
103
|
--
|
84
104
|
|
85
|
-
##### [caps](https://github.com/appium/ruby_lib/blob/
|
105
|
+
##### [caps](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L247)
|
86
106
|
|
87
107
|
> def caps
|
88
108
|
|
@@ -90,7 +110,7 @@ Selenium webdriver capabilities
|
|
90
110
|
|
91
111
|
--
|
92
112
|
|
93
|
-
##### [caps=](https://github.com/appium/ruby_lib/blob/
|
113
|
+
##### [caps=](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L247)
|
94
114
|
|
95
115
|
> def caps=(value)
|
96
116
|
|
@@ -98,7 +118,7 @@ Selenium webdriver capabilities
|
|
98
118
|
|
99
119
|
--
|
100
120
|
|
101
|
-
##### [custom_url](https://github.com/appium/ruby_lib/blob/
|
121
|
+
##### [custom_url](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L249)
|
102
122
|
|
103
123
|
> def custom_url
|
104
124
|
|
@@ -106,7 +126,7 @@ Custom URL for the selenium server
|
|
106
126
|
|
107
127
|
--
|
108
128
|
|
109
|
-
##### [custom_url=](https://github.com/appium/ruby_lib/blob/
|
129
|
+
##### [custom_url=](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L249)
|
110
130
|
|
111
131
|
> def custom_url=(value)
|
112
132
|
|
@@ -114,7 +134,7 @@ Custom URL for the selenium server
|
|
114
134
|
|
115
135
|
--
|
116
136
|
|
117
|
-
##### [export_session](https://github.com/appium/ruby_lib/blob/
|
137
|
+
##### [export_session](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L251)
|
118
138
|
|
119
139
|
> def export_session
|
120
140
|
|
@@ -122,7 +142,7 @@ Export session id to textfile in /tmp for 3rd party tools
|
|
122
142
|
|
123
143
|
--
|
124
144
|
|
125
|
-
##### [export_session=](https://github.com/appium/ruby_lib/blob/
|
145
|
+
##### [export_session=](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L251)
|
126
146
|
|
127
147
|
> def export_session=(value)
|
128
148
|
|
@@ -130,10 +150,11 @@ Export session id to textfile in /tmp for 3rd party tools
|
|
130
150
|
|
131
151
|
--
|
132
152
|
|
133
|
-
##### [default_wait](https://github.com/appium/ruby_lib/blob/
|
153
|
+
##### [default_wait](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L256)
|
134
154
|
|
135
155
|
> def default_wait
|
136
156
|
|
157
|
+
Default wait time for elements to appear
|
137
158
|
Returns the default client side wait.
|
138
159
|
This value is independent of what the server is using
|
139
160
|
|
@@ -143,15 +164,21 @@ __Returns:__
|
|
143
164
|
|
144
165
|
--
|
145
166
|
|
146
|
-
##### [default_wait=](https://github.com/appium/ruby_lib/blob/
|
167
|
+
##### [default_wait=](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L256)
|
147
168
|
|
148
169
|
> def default_wait=(value)
|
149
170
|
|
150
171
|
Default wait time for elements to appear
|
172
|
+
Returns the default client side wait.
|
173
|
+
This value is independent of what the server is using
|
174
|
+
|
175
|
+
__Returns:__
|
176
|
+
|
177
|
+
[Integer]
|
151
178
|
|
152
179
|
--
|
153
180
|
|
154
|
-
##### [last_waits](https://github.com/appium/ruby_lib/blob/
|
181
|
+
##### [last_waits](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L258)
|
155
182
|
|
156
183
|
> def last_waits
|
157
184
|
|
@@ -159,7 +186,7 @@ Array of previous wait time values
|
|
159
186
|
|
160
187
|
--
|
161
188
|
|
162
|
-
##### [last_waits=](https://github.com/appium/ruby_lib/blob/
|
189
|
+
##### [last_waits=](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L258)
|
163
190
|
|
164
191
|
> def last_waits=(value)
|
165
192
|
|
@@ -167,7 +194,7 @@ Array of previous wait time values
|
|
167
194
|
|
168
195
|
--
|
169
196
|
|
170
|
-
##### [sauce_username](https://github.com/appium/ruby_lib/blob/
|
197
|
+
##### [sauce_username](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L260)
|
171
198
|
|
172
199
|
> def sauce_username
|
173
200
|
|
@@ -175,7 +202,7 @@ Username for use on Sauce Labs
|
|
175
202
|
|
176
203
|
--
|
177
204
|
|
178
|
-
##### [sauce_username=](https://github.com/appium/ruby_lib/blob/
|
205
|
+
##### [sauce_username=](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L260)
|
179
206
|
|
180
207
|
> def sauce_username=(value)
|
181
208
|
|
@@ -183,7 +210,7 @@ Username for use on Sauce Labs
|
|
183
210
|
|
184
211
|
--
|
185
212
|
|
186
|
-
##### [sauce_access_key](https://github.com/appium/ruby_lib/blob/
|
213
|
+
##### [sauce_access_key](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L262)
|
187
214
|
|
188
215
|
> def sauce_access_key
|
189
216
|
|
@@ -191,7 +218,7 @@ Access Key for use on Sauce Labs
|
|
191
218
|
|
192
219
|
--
|
193
220
|
|
194
|
-
##### [sauce_access_key=](https://github.com/appium/ruby_lib/blob/
|
221
|
+
##### [sauce_access_key=](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L262)
|
195
222
|
|
196
223
|
> def sauce_access_key=(value)
|
197
224
|
|
@@ -199,7 +226,7 @@ Access Key for use on Sauce Labs
|
|
199
226
|
|
200
227
|
--
|
201
228
|
|
202
|
-
##### [appium_port](https://github.com/appium/ruby_lib/blob/
|
229
|
+
##### [appium_port](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L264)
|
203
230
|
|
204
231
|
> def appium_port
|
205
232
|
|
@@ -207,7 +234,7 @@ Appium's server port
|
|
207
234
|
|
208
235
|
--
|
209
236
|
|
210
|
-
##### [appium_port=](https://github.com/appium/ruby_lib/blob/
|
237
|
+
##### [appium_port=](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L264)
|
211
238
|
|
212
239
|
> def appium_port=(value)
|
213
240
|
|
@@ -215,7 +242,7 @@ Appium's server port
|
|
215
242
|
|
216
243
|
--
|
217
244
|
|
218
|
-
##### [appium_device](https://github.com/appium/ruby_lib/blob/
|
245
|
+
##### [appium_device](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L266)
|
219
246
|
|
220
247
|
> def appium_device
|
221
248
|
|
@@ -223,7 +250,7 @@ Device type to request from the appium server
|
|
223
250
|
|
224
251
|
--
|
225
252
|
|
226
|
-
##### [appium_device=](https://github.com/appium/ruby_lib/blob/
|
253
|
+
##### [appium_device=](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L266)
|
227
254
|
|
228
255
|
> def appium_device=(value)
|
229
256
|
|
@@ -231,7 +258,7 @@ Device type to request from the appium server
|
|
231
258
|
|
232
259
|
--
|
233
260
|
|
234
|
-
##### [appium_debug](https://github.com/appium/ruby_lib/blob/
|
261
|
+
##### [appium_debug](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L268)
|
235
262
|
|
236
263
|
> def appium_debug
|
237
264
|
|
@@ -239,7 +266,7 @@ Boolean debug mode for the Appium Ruby bindings
|
|
239
266
|
|
240
267
|
--
|
241
268
|
|
242
|
-
##### [appium_debug=](https://github.com/appium/ruby_lib/blob/
|
269
|
+
##### [appium_debug=](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L268)
|
243
270
|
|
244
271
|
> def appium_debug=(value)
|
245
272
|
|
@@ -247,9 +274,21 @@ Boolean debug mode for the Appium Ruby bindings
|
|
247
274
|
|
248
275
|
--
|
249
276
|
|
250
|
-
##### [
|
277
|
+
##### [driver](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L272)
|
251
278
|
|
252
|
-
> def
|
279
|
+
> def driver
|
280
|
+
|
281
|
+
Returns the driver
|
282
|
+
|
283
|
+
__Returns:__
|
284
|
+
|
285
|
+
[Driver] the driver
|
286
|
+
|
287
|
+
--
|
288
|
+
|
289
|
+
##### [initialize](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L293)
|
290
|
+
|
291
|
+
> def initialize(opts = {})
|
253
292
|
|
254
293
|
Creates a new driver
|
255
294
|
|
@@ -278,7 +317,7 @@ __Returns:__
|
|
278
317
|
|
279
318
|
--
|
280
319
|
|
281
|
-
##### [driver_attributes](https://github.com/appium/ruby_lib/blob/
|
320
|
+
##### [driver_attributes](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L359)
|
282
321
|
|
283
322
|
> def driver_attributes
|
284
323
|
|
@@ -286,7 +325,7 @@ Returns a hash of the driver attributes
|
|
286
325
|
|
287
326
|
--
|
288
327
|
|
289
|
-
##### [device_is_android?](https://github.com/appium/ruby_lib/blob/
|
328
|
+
##### [device_is_android?](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L379)
|
290
329
|
|
291
330
|
> def device_is_android?
|
292
331
|
|
@@ -298,7 +337,7 @@ __Returns:__
|
|
298
337
|
|
299
338
|
--
|
300
339
|
|
301
|
-
##### [appium_server_version](https://github.com/appium/ruby_lib/blob/
|
340
|
+
##### [appium_server_version](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L395)
|
302
341
|
|
303
342
|
> def appium_server_version
|
304
343
|
|
@@ -319,9 +358,9 @@ __Returns:__
|
|
319
358
|
|
320
359
|
--
|
321
360
|
|
322
|
-
##### [absolute_app_path](https://github.com/appium/ruby_lib/blob/
|
361
|
+
##### [absolute_app_path](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L407)
|
323
362
|
|
324
|
-
> def self.absolute_app_path
|
363
|
+
> def self.absolute_app_path(opts)
|
325
364
|
|
326
365
|
Converts app_path to an absolute path.
|
327
366
|
|
@@ -336,7 +375,7 @@ __Returns:__
|
|
336
375
|
|
337
376
|
--
|
338
377
|
|
339
|
-
##### [server_url](https://github.com/appium/ruby_lib/blob/
|
378
|
+
##### [server_url](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L440)
|
340
379
|
|
341
380
|
> def server_url
|
342
381
|
|
@@ -348,7 +387,7 @@ __Returns:__
|
|
348
387
|
|
349
388
|
--
|
350
389
|
|
351
|
-
##### [restart](https://github.com/appium/ruby_lib/blob/
|
390
|
+
##### [restart](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L451)
|
352
391
|
|
353
392
|
> def restart
|
354
393
|
|
@@ -360,21 +399,9 @@ __Returns:__
|
|
360
399
|
|
361
400
|
--
|
362
401
|
|
363
|
-
##### [
|
364
|
-
|
365
|
-
> def driver
|
366
|
-
|
367
|
-
Returns the driver
|
368
|
-
|
369
|
-
__Returns:__
|
370
|
-
|
371
|
-
[Driver] the driver
|
372
|
-
|
373
|
-
--
|
374
|
-
|
375
|
-
##### [screenshot](https://github.com/appium/ruby_lib/blob/ea11190b9ab36e34226d988f85fe612af6f769de/lib/appium_lib/driver.rb#L453)
|
402
|
+
##### [screenshot](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L462)
|
376
403
|
|
377
|
-
> def screenshot
|
404
|
+
> def screenshot(png_save_path)
|
378
405
|
|
379
406
|
Takes a png screenshot and saves to the target path.
|
380
407
|
|
@@ -390,7 +417,7 @@ __Returns:__
|
|
390
417
|
|
391
418
|
--
|
392
419
|
|
393
|
-
##### [driver_quit](https://github.com/appium/ruby_lib/blob/
|
420
|
+
##### [driver_quit](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L469)
|
394
421
|
|
395
422
|
> def driver_quit
|
396
423
|
|
@@ -402,7 +429,7 @@ __Returns:__
|
|
402
429
|
|
403
430
|
--
|
404
431
|
|
405
|
-
##### [start_driver](https://github.com/appium/ruby_lib/blob/
|
432
|
+
##### [start_driver](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L478)
|
406
433
|
|
407
434
|
> def start_driver
|
408
435
|
|
@@ -414,7 +441,7 @@ __Returns:__
|
|
414
441
|
|
415
442
|
--
|
416
443
|
|
417
|
-
##### [no_wait](https://github.com/appium/ruby_lib/blob/
|
444
|
+
##### [no_wait](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L506)
|
418
445
|
|
419
446
|
> def no_wait
|
420
447
|
|
@@ -422,9 +449,9 @@ Set implicit wait and default_wait to zero.
|
|
422
449
|
|
423
450
|
--
|
424
451
|
|
425
|
-
##### [set_wait](https://github.com/appium/ruby_lib/blob/
|
452
|
+
##### [set_wait](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L525)
|
426
453
|
|
427
|
-
> def set_wait
|
454
|
+
> def set_wait(timeout = nil)
|
428
455
|
|
429
456
|
Set implicit wait and default_wait to timeout, defaults to 30.
|
430
457
|
if set_wait is called without a param then the second to last
|
@@ -447,9 +474,9 @@ __Returns:__
|
|
447
474
|
|
448
475
|
--
|
449
476
|
|
450
|
-
##### [exists](https://github.com/appium/ruby_lib/blob/
|
477
|
+
##### [exists](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L552)
|
451
478
|
|
452
|
-
> def exists
|
479
|
+
> def exists(pre_check = 0, post_check = @default_wait, &search_block)
|
453
480
|
|
454
481
|
Returns existence of element.
|
455
482
|
|
@@ -473,9 +500,9 @@ __Returns:__
|
|
473
500
|
|
474
501
|
--
|
475
502
|
|
476
|
-
##### [execute_script](https://github.com/appium/ruby_lib/blob/
|
503
|
+
##### [execute_script](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L576)
|
477
504
|
|
478
|
-
> def execute_script
|
505
|
+
> def execute_script(script, *args)
|
479
506
|
|
480
507
|
The same as @driver.execute_script
|
481
508
|
|
@@ -491,9 +518,9 @@ __Returns:__
|
|
491
518
|
|
492
519
|
--
|
493
520
|
|
494
|
-
##### [find_elements](https://github.com/appium/ruby_lib/blob/
|
521
|
+
##### [find_elements](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L584)
|
495
522
|
|
496
|
-
> def find_elements
|
523
|
+
> def find_elements(*args)
|
497
524
|
|
498
525
|
Calls @driver.find_elements
|
499
526
|
|
@@ -507,9 +534,9 @@ __Returns:__
|
|
507
534
|
|
508
535
|
--
|
509
536
|
|
510
|
-
##### [find_element](https://github.com/appium/ruby_lib/blob/
|
537
|
+
##### [find_element](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L592)
|
511
538
|
|
512
|
-
> def find_element
|
539
|
+
> def find_element(*args)
|
513
540
|
|
514
541
|
Calls @driver.find_elements
|
515
542
|
|
@@ -523,7 +550,23 @@ __Returns:__
|
|
523
550
|
|
524
551
|
--
|
525
552
|
|
526
|
-
##### [
|
553
|
+
##### [set_location](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L605)
|
554
|
+
|
555
|
+
> def set_location(opts = {})
|
556
|
+
|
557
|
+
Calls @driver.set_location
|
558
|
+
|
559
|
+
__Parameters:__
|
560
|
+
|
561
|
+
[Hash] opts - consisting of:
|
562
|
+
|
563
|
+
__Returns:__
|
564
|
+
|
565
|
+
[Selenium::WebDriver::Location] the location constructed by the selenium webdriver
|
566
|
+
|
567
|
+
--
|
568
|
+
|
569
|
+
##### [x](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/driver.rb#L615)
|
527
570
|
|
528
571
|
> def x
|
529
572
|
|
@@ -536,7 +579,19 @@ __Returns:__
|
|
536
579
|
|
537
580
|
--
|
538
581
|
|
539
|
-
##### [logger](https://github.com/appium/ruby_lib/blob/
|
582
|
+
##### [logger=](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/logger.rb#L13)
|
583
|
+
|
584
|
+
> def logger=(value)
|
585
|
+
|
586
|
+
Sets the attribute logger
|
587
|
+
|
588
|
+
__Parameters:__
|
589
|
+
|
590
|
+
value - the value to set the attribute logger to.
|
591
|
+
|
592
|
+
--
|
593
|
+
|
594
|
+
##### [logger](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/logger.rb#L17)
|
540
595
|
|
541
596
|
> def logger
|
542
597
|
|
@@ -544,7 +599,7 @@ __Returns:__
|
|
544
599
|
|
545
600
|
--
|
546
601
|
|
547
|
-
##### [NoArgMethods](https://github.com/appium/ruby_lib/blob/
|
602
|
+
##### [NoArgMethods](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/device.rb#L7)
|
548
603
|
|
549
604
|
> NoArgMethods = {
|
550
605
|
|
@@ -552,7 +607,7 @@ __Returns:__
|
|
552
607
|
|
553
608
|
--
|
554
609
|
|
555
|
-
##### [app_strings](https://github.com/appium/ruby_lib/blob/
|
610
|
+
##### [app_strings](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/device.rb#L24)
|
556
611
|
|
557
612
|
> def app_strings
|
558
613
|
|
@@ -563,7 +618,7 @@ app_strings #=> "TransitionsTitle"=>"Transitions", "WebTitle"=>"Web"
|
|
563
618
|
|
564
619
|
--
|
565
620
|
|
566
|
-
##### [background_app](https://github.com/appium/ruby_lib/blob/
|
621
|
+
##### [background_app](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/device.rb#L30)
|
567
622
|
|
568
623
|
> def background_app
|
569
624
|
|
@@ -572,7 +627,7 @@ This is a blocking application
|
|
572
627
|
|
573
628
|
--
|
574
629
|
|
575
|
-
##### [current_activity](https://github.com/appium/ruby_lib/blob/
|
630
|
+
##### [current_activity](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/device.rb#L35)
|
576
631
|
|
577
632
|
> def current_activity
|
578
633
|
|
@@ -580,15 +635,15 @@ This is a blocking application
|
|
580
635
|
|
581
636
|
--
|
582
637
|
|
583
|
-
##### [launch_app](https://github.com/appium/ruby_lib/blob/
|
638
|
+
##### [launch_app](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/device.rb#L37)
|
584
639
|
|
585
640
|
> def launch_app
|
586
641
|
|
587
|
-
Start the simulator and
|
642
|
+
Start the simulator and application configured with desired capabilities
|
588
643
|
|
589
644
|
--
|
590
645
|
|
591
|
-
##### [reset](https://github.com/appium/ruby_lib/blob/
|
646
|
+
##### [reset](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/device.rb#L40)
|
592
647
|
|
593
648
|
> def reset
|
594
649
|
|
@@ -596,7 +651,7 @@ Reset the device, relaunching the application.
|
|
596
651
|
|
597
652
|
--
|
598
653
|
|
599
|
-
##### [shake](https://github.com/appium/ruby_lib/blob/
|
654
|
+
##### [shake](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/device.rb#L43)
|
600
655
|
|
601
656
|
> def shake
|
602
657
|
|
@@ -604,15 +659,23 @@ Cause the device to shake
|
|
604
659
|
|
605
660
|
--
|
606
661
|
|
607
|
-
##### [toggle_flight_mode](https://github.com/appium/ruby_lib/blob/
|
662
|
+
##### [toggle_flight_mode](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/device.rb#L46)
|
608
663
|
|
609
664
|
> def toggle_flight_mode
|
610
665
|
|
611
|
-
|
666
|
+
Toggle flight mode on or off
|
667
|
+
|
668
|
+
--
|
669
|
+
|
670
|
+
##### [device_locked?](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/device.rb#L49)
|
671
|
+
|
672
|
+
> def device_locked?
|
673
|
+
|
674
|
+
|
612
675
|
|
613
676
|
--
|
614
677
|
|
615
|
-
##### [hide_keyboard](https://github.com/appium/ruby_lib/blob/
|
678
|
+
##### [hide_keyboard](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/device.rb#L51)
|
616
679
|
|
617
680
|
> def hide_keyboard
|
618
681
|
|
@@ -625,7 +688,7 @@ Defaults to 'Done'.
|
|
625
688
|
|
626
689
|
--
|
627
690
|
|
628
|
-
##### [press_keycode](https://github.com/appium/ruby_lib/blob/
|
691
|
+
##### [press_keycode](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/device.rb#L60)
|
629
692
|
|
630
693
|
> def press_keycode
|
631
694
|
|
@@ -640,7 +703,7 @@ __Parameters:__
|
|
640
703
|
|
641
704
|
--
|
642
705
|
|
643
|
-
##### [long_press_keycode](https://github.com/appium/ruby_lib/blob/
|
706
|
+
##### [long_press_keycode](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/device.rb#L66)
|
644
707
|
|
645
708
|
> def long_press_keycode
|
646
709
|
|
@@ -655,7 +718,7 @@ __Parameters:__
|
|
655
718
|
|
656
719
|
--
|
657
720
|
|
658
|
-
##### [push_file](https://github.com/appium/ruby_lib/blob/
|
721
|
+
##### [push_file](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/device.rb#L72)
|
659
722
|
|
660
723
|
> def push_file
|
661
724
|
|
@@ -669,7 +732,7 @@ __Parameters:__
|
|
669
732
|
|
670
733
|
--
|
671
734
|
|
672
|
-
##### [pull_file](https://github.com/appium/ruby_lib/blob/
|
735
|
+
##### [pull_file](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/device.rb#L77)
|
673
736
|
|
674
737
|
> def pull_file
|
675
738
|
|
@@ -686,7 +749,7 @@ __Parameters:__
|
|
686
749
|
|
687
750
|
--
|
688
751
|
|
689
|
-
##### [pull_folder](https://github.com/appium/ruby_lib/blob/
|
752
|
+
##### [pull_folder](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/device.rb#L87)
|
690
753
|
|
691
754
|
> def pull_folder
|
692
755
|
|
@@ -701,7 +764,7 @@ __Parameters:__
|
|
701
764
|
|
702
765
|
--
|
703
766
|
|
704
|
-
##### [end_coverage](https://github.com/appium/ruby_lib/blob/
|
767
|
+
##### [end_coverage](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/device.rb#L95)
|
705
768
|
|
706
769
|
> def end_coverage
|
707
770
|
|
@@ -715,7 +778,7 @@ __Parameters:__
|
|
715
778
|
|
716
779
|
--
|
717
780
|
|
718
|
-
##### [get_settings](https://github.com/appium/ruby_lib/blob/
|
781
|
+
##### [get_settings](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/device.rb#L100)
|
719
782
|
|
720
783
|
> def get_settings
|
721
784
|
|
@@ -723,7 +786,7 @@ Get appium Settings for current test session
|
|
723
786
|
|
724
787
|
--
|
725
788
|
|
726
|
-
##### [extend_search_contexts](https://github.com/appium/ruby_lib/blob/
|
789
|
+
##### [extend_search_contexts](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/device.rb#L351)
|
727
790
|
|
728
791
|
> def extend_search_contexts
|
729
792
|
|
@@ -731,7 +794,7 @@ Get appium Settings for current test session
|
|
731
794
|
|
732
795
|
--
|
733
796
|
|
734
|
-
##### [accessiblity_id_find](https://github.com/appium/ruby_lib/blob/
|
797
|
+
##### [accessiblity_id_find](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/device.rb#L351)
|
735
798
|
|
736
799
|
> def accessiblity_id_find
|
737
800
|
|
@@ -743,7 +806,7 @@ find_element/s with their accessibility_id
|
|
743
806
|
|
744
807
|
--
|
745
808
|
|
746
|
-
##### [add_touch_actions](https://github.com/appium/ruby_lib/blob/
|
809
|
+
##### [add_touch_actions](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/device.rb#L357)
|
747
810
|
|
748
811
|
> def add_touch_actions
|
749
812
|
|
@@ -751,7 +814,7 @@ find_element/s with their accessibility_id
|
|
751
814
|
|
752
815
|
--
|
753
816
|
|
754
|
-
##### [set_context](https://github.com/appium/ruby_lib/blob/
|
817
|
+
##### [set_context](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/device.rb#L381)
|
755
818
|
|
756
819
|
> def set_context
|
757
820
|
|
@@ -766,7 +829,7 @@ __Parameters:__
|
|
766
829
|
|
767
830
|
--
|
768
831
|
|
769
|
-
##### [current_context](https://github.com/appium/ruby_lib/blob/
|
832
|
+
##### [current_context](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/device.rb#L389)
|
770
833
|
|
771
834
|
> def current_context
|
772
835
|
|
@@ -778,7 +841,7 @@ __Returns:__
|
|
778
841
|
|
779
842
|
--
|
780
843
|
|
781
|
-
##### [available_contexts](https://github.com/appium/ruby_lib/blob/
|
844
|
+
##### [available_contexts](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/device.rb#L392)
|
782
845
|
|
783
846
|
> def available_contexts
|
784
847
|
|
@@ -790,7 +853,7 @@ __Returns:__
|
|
790
853
|
|
791
854
|
--
|
792
855
|
|
793
|
-
##### [within_context](https://github.com/appium/ruby_lib/blob/
|
856
|
+
##### [within_context](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/device.rb#L402)
|
794
857
|
|
795
858
|
> def within_context(context)
|
796
859
|
|
@@ -806,7 +869,7 @@ __Parameters:__
|
|
806
869
|
|
807
870
|
--
|
808
871
|
|
809
|
-
##### [switch_to_default_context](https://github.com/appium/ruby_lib/blob/
|
872
|
+
##### [switch_to_default_context](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/device.rb#L410)
|
810
873
|
|
811
874
|
> def switch_to_default_context
|
812
875
|
|
@@ -814,9 +877,9 @@ Change to the default context. This is equivalent to `set_context nil`.
|
|
814
877
|
|
815
878
|
--
|
816
879
|
|
817
|
-
##### [pinch](https://github.com/appium/ruby_lib/blob/
|
880
|
+
##### [pinch](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/multi_touch.rb#L28)
|
818
881
|
|
819
|
-
> def pinch(percentage=25, auto_perform=true)
|
882
|
+
> def pinch(percentage = 25, auto_perform = true)
|
820
883
|
|
821
884
|
Convenience method for pinching the screen.
|
822
885
|
Places two fingers at the edges of the screen and brings them together.
|
@@ -833,9 +896,9 @@ __Parameters:__
|
|
833
896
|
|
834
897
|
--
|
835
898
|
|
836
|
-
##### [zoom](https://github.com/appium/ruby_lib/blob/
|
899
|
+
##### [zoom](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/multi_touch.rb#L56)
|
837
900
|
|
838
|
-
> def zoom(percentage=200, auto_perform=true)
|
901
|
+
> def zoom(percentage = 200, auto_perform = true)
|
839
902
|
|
840
903
|
Convenience method for zooming the screen.
|
841
904
|
Places two fingers at the edges of the screen and brings them together.
|
@@ -852,7 +915,7 @@ __Parameters:__
|
|
852
915
|
|
853
916
|
--
|
854
917
|
|
855
|
-
##### [initialize](https://github.com/appium/ruby_lib/blob/
|
918
|
+
##### [initialize](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/multi_touch.rb#L77)
|
856
919
|
|
857
920
|
> def initialize
|
858
921
|
|
@@ -864,7 +927,7 @@ __Returns:__
|
|
864
927
|
|
865
928
|
--
|
866
929
|
|
867
|
-
##### [add](https://github.com/appium/ruby_lib/blob/
|
930
|
+
##### [add](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/multi_touch.rb#L83)
|
868
931
|
|
869
932
|
> def add(chain)
|
870
933
|
|
@@ -876,7 +939,7 @@ __Parameters:__
|
|
876
939
|
|
877
940
|
--
|
878
941
|
|
879
|
-
##### [perform](https://github.com/appium/ruby_lib/blob/
|
942
|
+
##### [perform](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/multi_touch.rb#L88)
|
880
943
|
|
881
944
|
> def perform
|
882
945
|
|
@@ -884,7 +947,7 @@ Ask Appium to perform the actions
|
|
884
947
|
|
885
948
|
--
|
886
949
|
|
887
|
-
##### [ACTIONS](https://github.com/appium/ruby_lib/blob/
|
950
|
+
##### [ACTIONS](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/touch_actions.rb#L11)
|
888
951
|
|
889
952
|
> ACTIONS = [:move_to, :long_press, :press, :release, :tap, :wait, :perform]
|
890
953
|
|
@@ -892,7 +955,7 @@ Ask Appium to perform the actions
|
|
892
955
|
|
893
956
|
--
|
894
957
|
|
895
|
-
##### [COMPLEX_ACTIONS](https://github.com/appium/ruby_lib/blob/
|
958
|
+
##### [COMPLEX_ACTIONS](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/touch_actions.rb#L12)
|
896
959
|
|
897
960
|
> COMPLEX_ACTIONS = [:swipe]
|
898
961
|
|
@@ -900,7 +963,7 @@ Ask Appium to perform the actions
|
|
900
963
|
|
901
964
|
--
|
902
965
|
|
903
|
-
##### [actions](https://github.com/appium/ruby_lib/blob/
|
966
|
+
##### [actions](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/touch_actions.rb#L26)
|
904
967
|
|
905
968
|
> def actions
|
906
969
|
|
@@ -908,7 +971,7 @@ Returns the value of attribute actions
|
|
908
971
|
|
909
972
|
--
|
910
973
|
|
911
|
-
##### [initialize](https://github.com/appium/ruby_lib/blob/
|
974
|
+
##### [initialize](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/touch_actions.rb#L28)
|
912
975
|
|
913
976
|
> def initialize
|
914
977
|
|
@@ -920,7 +983,7 @@ __Returns:__
|
|
920
983
|
|
921
984
|
--
|
922
985
|
|
923
|
-
##### [move_to](https://github.com/appium/ruby_lib/blob/
|
986
|
+
##### [move_to](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/touch_actions.rb#L36)
|
924
987
|
|
925
988
|
> def move_to(opts)
|
926
989
|
|
@@ -932,7 +995,7 @@ __Parameters:__
|
|
932
995
|
|
933
996
|
--
|
934
997
|
|
935
|
-
##### [long_press](https://github.com/appium/ruby_lib/blob/
|
998
|
+
##### [long_press](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/touch_actions.rb#L46)
|
936
999
|
|
937
1000
|
> def long_press(opts)
|
938
1001
|
|
@@ -950,7 +1013,7 @@ __Parameters:__
|
|
950
1013
|
|
951
1014
|
--
|
952
1015
|
|
953
|
-
##### [press](https://github.com/appium/ruby_lib/blob/
|
1016
|
+
##### [press](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/touch_actions.rb#L58)
|
954
1017
|
|
955
1018
|
> def press(opts)
|
956
1019
|
|
@@ -963,9 +1026,9 @@ __Parameters:__
|
|
963
1026
|
|
964
1027
|
--
|
965
1028
|
|
966
|
-
##### [release](https://github.com/appium/ruby_lib/blob/
|
1029
|
+
##### [release](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/touch_actions.rb#L69)
|
967
1030
|
|
968
|
-
> def release(opts=nil)
|
1031
|
+
> def release(opts = nil)
|
969
1032
|
|
970
1033
|
Remove a finger from the screen.
|
971
1034
|
|
@@ -975,7 +1038,7 @@ __Parameters:__
|
|
975
1038
|
|
976
1039
|
--
|
977
1040
|
|
978
|
-
##### [tap](https://github.com/appium/ruby_lib/blob/
|
1041
|
+
##### [tap](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/touch_actions.rb#L80)
|
979
1042
|
|
980
1043
|
> def tap(opts)
|
981
1044
|
|
@@ -987,7 +1050,7 @@ __Parameters:__
|
|
987
1050
|
|
988
1051
|
--
|
989
1052
|
|
990
|
-
##### [wait](https://github.com/appium/ruby_lib/blob/
|
1053
|
+
##### [wait](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/touch_actions.rb#L89)
|
991
1054
|
|
992
1055
|
> def wait(milliseconds)
|
993
1056
|
|
@@ -999,7 +1062,7 @@ __Parameters:__
|
|
999
1062
|
|
1000
1063
|
--
|
1001
1064
|
|
1002
|
-
##### [swipe](https://github.com/appium/ruby_lib/blob/
|
1065
|
+
##### [swipe](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/touch_actions.rb#L103)
|
1003
1066
|
|
1004
1067
|
> def swipe(opts)
|
1005
1068
|
|
@@ -1013,7 +1076,7 @@ __Parameters:__
|
|
1013
1076
|
|
1014
1077
|
--
|
1015
1078
|
|
1016
|
-
##### [perform](https://github.com/appium/ruby_lib/blob/
|
1079
|
+
##### [perform](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/touch_actions.rb#L118)
|
1017
1080
|
|
1018
1081
|
> def perform
|
1019
1082
|
|
@@ -1021,7 +1084,7 @@ Ask the driver to perform all actions in this action chain.
|
|
1021
1084
|
|
1022
1085
|
--
|
1023
1086
|
|
1024
|
-
##### [cancel](https://github.com/appium/ruby_lib/blob/
|
1087
|
+
##### [cancel](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/touch_actions.rb#L124)
|
1025
1088
|
|
1026
1089
|
> def cancel
|
1027
1090
|
|
@@ -1029,15 +1092,15 @@ Does nothing, currently.
|
|
1029
1092
|
|
1030
1093
|
--
|
1031
1094
|
|
1032
|
-
##### [chain_method](https://github.com/appium/ruby_lib/blob/
|
1095
|
+
##### [chain_method](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/touch_actions.rb#L132)
|
1033
1096
|
|
1034
|
-
> def chain_method(method, args=nil)
|
1097
|
+
> def chain_method(method, args = nil)
|
1035
1098
|
|
1036
1099
|
|
1037
1100
|
|
1038
1101
|
--
|
1039
1102
|
|
1040
|
-
##### [args_with_ele_ref](https://github.com/appium/ruby_lib/blob/
|
1103
|
+
##### [args_with_ele_ref](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/device/touch_actions.rb#L141)
|
1041
1104
|
|
1042
1105
|
> def args_with_ele_ref(args)
|
1043
1106
|
|
@@ -1045,26 +1108,26 @@ Does nothing, currently.
|
|
1045
1108
|
|
1046
1109
|
--
|
1047
1110
|
|
1048
|
-
##### [_generic_wait](https://github.com/appium/ruby_lib/blob/
|
1111
|
+
##### [_generic_wait](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/wait.rb#L9)
|
1049
1112
|
|
1050
|
-
> def _generic_wait
|
1113
|
+
> def _generic_wait(opts = {}, &block)
|
1051
1114
|
|
1052
1115
|
Wait code from the selenium Ruby gem
|
1053
1116
|
https://github.com/SeleniumHQ/selenium/blob/cf501dda3f0ed12233de51ce8170c0e8090f0c20/rb/lib/selenium/webdriver/common/wait.rb
|
1054
1117
|
|
1055
1118
|
--
|
1056
1119
|
|
1057
|
-
##### [_process_wait_opts](https://github.com/appium/ruby_lib/blob/
|
1120
|
+
##### [_process_wait_opts](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/wait.rb#L54)
|
1058
1121
|
|
1059
|
-
> def _process_wait_opts
|
1122
|
+
> def _process_wait_opts(opts)
|
1060
1123
|
|
1061
1124
|
process opts before calling _generic_wait
|
1062
1125
|
|
1063
1126
|
--
|
1064
1127
|
|
1065
|
-
##### [wait_true](https://github.com/appium/ruby_lib/blob/
|
1128
|
+
##### [wait_true](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/wait.rb#L75)
|
1066
1129
|
|
1067
|
-
> def wait_true
|
1130
|
+
> def wait_true(opts = {}, &block)
|
1068
1131
|
|
1069
1132
|
Check every interval seconds to see if block.call returns a truthy value.
|
1070
1133
|
Note this isn't a strict boolean true, any truthy value is accepted.
|
@@ -1082,9 +1145,9 @@ __Parameters:__
|
|
1082
1145
|
|
1083
1146
|
--
|
1084
1147
|
|
1085
|
-
##### [wait](https://github.com/appium/ruby_lib/blob/
|
1148
|
+
##### [wait](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/wait.rb#L93)
|
1086
1149
|
|
1087
|
-
> def wait
|
1150
|
+
> def wait(opts = {}, &block)
|
1088
1151
|
|
1089
1152
|
Check every interval seconds to see if block.call doesn't raise an exception.
|
1090
1153
|
Give up after timeout seconds.
|
@@ -1100,15 +1163,15 @@ __Parameters:__
|
|
1100
1163
|
|
1101
1164
|
--
|
1102
1165
|
|
1103
|
-
##### [ignore](https://github.com/appium/ruby_lib/blob/
|
1166
|
+
##### [ignore](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/helper.rb#L24)
|
1104
1167
|
|
1105
|
-
> def ignore
|
1168
|
+
> def ignore(&block)
|
1106
1169
|
|
1107
1170
|
Return block.call and ignore any exceptions.
|
1108
1171
|
|
1109
1172
|
--
|
1110
1173
|
|
1111
|
-
##### [back](https://github.com/appium/ruby_lib/blob/
|
1174
|
+
##### [back](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/helper.rb#L31)
|
1112
1175
|
|
1113
1176
|
> def back
|
1114
1177
|
|
@@ -1120,7 +1183,7 @@ __Returns:__
|
|
1120
1183
|
|
1121
1184
|
--
|
1122
1185
|
|
1123
|
-
##### [session_id](https://github.com/appium/ruby_lib/blob/
|
1186
|
+
##### [session_id](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/helper.rb#L36)
|
1124
1187
|
|
1125
1188
|
> def session_id
|
1126
1189
|
|
@@ -1128,9 +1191,9 @@ For Sauce Labs reporting. Returns the current session id.
|
|
1128
1191
|
|
1129
1192
|
--
|
1130
1193
|
|
1131
|
-
##### [xpath](https://github.com/appium/ruby_lib/blob/
|
1194
|
+
##### [xpath](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/helper.rb#L44)
|
1132
1195
|
|
1133
|
-
> def xpath
|
1196
|
+
> def xpath(xpath_str)
|
1134
1197
|
|
1135
1198
|
Returns the first element that matches the provided xpath.
|
1136
1199
|
|
@@ -1144,9 +1207,9 @@ __Returns:__
|
|
1144
1207
|
|
1145
1208
|
--
|
1146
1209
|
|
1147
|
-
##### [xpaths](https://github.com/appium/ruby_lib/blob/
|
1210
|
+
##### [xpaths](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/helper.rb#L52)
|
1148
1211
|
|
1149
|
-
> def xpaths
|
1212
|
+
> def xpaths(xpath_str)
|
1150
1213
|
|
1151
1214
|
Returns all elements that match the provided xpath.
|
1152
1215
|
|
@@ -1160,15 +1223,15 @@ __Returns:__
|
|
1160
1223
|
|
1161
1224
|
--
|
1162
1225
|
|
1163
|
-
##### [_print_source](https://github.com/appium/ruby_lib/blob/
|
1226
|
+
##### [_print_source](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/helper.rb#L56)
|
1164
1227
|
|
1165
|
-
> def _print_source
|
1228
|
+
> def _print_source(source)
|
1166
1229
|
|
1167
1230
|
|
1168
1231
|
|
1169
1232
|
--
|
1170
1233
|
|
1171
|
-
##### [result](https://github.com/appium/ruby_lib/blob/
|
1234
|
+
##### [result](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/helper.rb#L69)
|
1172
1235
|
|
1173
1236
|
> def result
|
1174
1237
|
|
@@ -1176,7 +1239,7 @@ Returns the value of attribute result
|
|
1176
1239
|
|
1177
1240
|
--
|
1178
1241
|
|
1179
|
-
##### [initialize](https://github.com/appium/ruby_lib/blob/
|
1242
|
+
##### [initialize](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/helper.rb#L71)
|
1180
1243
|
|
1181
1244
|
> def initialize
|
1182
1245
|
|
@@ -1188,7 +1251,7 @@ __Returns:__
|
|
1188
1251
|
|
1189
1252
|
--
|
1190
1253
|
|
1191
|
-
##### [reset](https://github.com/appium/ruby_lib/blob/
|
1254
|
+
##### [reset](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/helper.rb#L75)
|
1192
1255
|
|
1193
1256
|
> def reset
|
1194
1257
|
|
@@ -1196,15 +1259,15 @@ __Returns:__
|
|
1196
1259
|
|
1197
1260
|
--
|
1198
1261
|
|
1199
|
-
##### [start_element](https://github.com/appium/ruby_lib/blob/
|
1262
|
+
##### [start_element](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/helper.rb#L80)
|
1200
1263
|
|
1201
|
-
> def start_element
|
1264
|
+
> def start_element(name, attrs = [])
|
1202
1265
|
|
1203
1266
|
http://nokogiri.org/Nokogiri/XML/SAX/Document.html
|
1204
1267
|
|
1205
1268
|
--
|
1206
1269
|
|
1207
|
-
##### [formatted_result](https://github.com/appium/ruby_lib/blob/
|
1270
|
+
##### [formatted_result](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/helper.rb#L86)
|
1208
1271
|
|
1209
1272
|
> def formatted_result
|
1210
1273
|
|
@@ -1212,7 +1275,7 @@ http://nokogiri.org/Nokogiri/XML/SAX/Document.html
|
|
1212
1275
|
|
1213
1276
|
--
|
1214
1277
|
|
1215
|
-
##### [get_page_class](https://github.com/appium/ruby_lib/blob/
|
1278
|
+
##### [get_page_class](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/helper.rb#L97)
|
1216
1279
|
|
1217
1280
|
> def get_page_class
|
1218
1281
|
|
@@ -1220,7 +1283,7 @@ Returns a string of class counts of visible elements.
|
|
1220
1283
|
|
1221
1284
|
--
|
1222
1285
|
|
1223
|
-
##### [page_class](https://github.com/appium/ruby_lib/blob/
|
1286
|
+
##### [page_class](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/helper.rb#L108)
|
1224
1287
|
|
1225
1288
|
> def page_class
|
1226
1289
|
|
@@ -1229,9 +1292,9 @@ Useful for appium_console.
|
|
1229
1292
|
|
1230
1293
|
--
|
1231
1294
|
|
1232
|
-
##### [px_to_window_rel](https://github.com/appium/ruby_lib/blob/
|
1295
|
+
##### [px_to_window_rel](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/helper.rb#L118)
|
1233
1296
|
|
1234
|
-
> def px_to_window_rel
|
1297
|
+
> def px_to_window_rel(opts = {})
|
1235
1298
|
|
1236
1299
|
Converts pixel values to window relative values
|
1237
1300
|
|
@@ -1241,9 +1304,9 @@ px_to_window_rel x: 50, y: 150
|
|
1241
1304
|
|
1242
1305
|
--
|
1243
1306
|
|
1244
|
-
##### [xml_keys](https://github.com/appium/ruby_lib/blob/
|
1307
|
+
##### [xml_keys](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/helper.rb#L137)
|
1245
1308
|
|
1246
|
-
> def xml_keys
|
1309
|
+
> def xml_keys(target)
|
1247
1310
|
|
1248
1311
|
Search strings.xml's values for target.
|
1249
1312
|
|
@@ -1257,9 +1320,9 @@ __Returns:__
|
|
1257
1320
|
|
1258
1321
|
--
|
1259
1322
|
|
1260
|
-
##### [xml_values](https://github.com/appium/ruby_lib/blob/
|
1323
|
+
##### [xml_values](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/helper.rb#L145)
|
1261
1324
|
|
1262
|
-
> def xml_values
|
1325
|
+
> def xml_values(target)
|
1263
1326
|
|
1264
1327
|
Search strings.xml's keys for target.
|
1265
1328
|
|
@@ -1273,9 +1336,9 @@ __Returns:__
|
|
1273
1336
|
|
1274
1337
|
--
|
1275
1338
|
|
1276
|
-
##### [resolve_id](https://github.com/appium/ruby_lib/blob/
|
1339
|
+
##### [resolve_id](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/helper.rb#L153)
|
1277
1340
|
|
1278
|
-
> def resolve_id
|
1341
|
+
> def resolve_id(id)
|
1279
1342
|
|
1280
1343
|
Resolve id in strings.xml and return the value.
|
1281
1344
|
|
@@ -1289,23 +1352,23 @@ __Returns:__
|
|
1289
1352
|
|
1290
1353
|
--
|
1291
1354
|
|
1292
|
-
##### [filter](https://github.com/appium/ruby_lib/blob/
|
1355
|
+
##### [filter](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/helper.rb#L159)
|
1293
1356
|
|
1294
1357
|
> def filter
|
1295
1358
|
|
1296
|
-
|
1359
|
+
Returns the value of attribute filter
|
1297
1360
|
|
1298
1361
|
--
|
1299
1362
|
|
1300
|
-
##### [filter=](https://github.com/appium/ruby_lib/blob/
|
1363
|
+
##### [filter=](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/helper.rb#L162)
|
1301
1364
|
|
1302
|
-
> def filter=
|
1365
|
+
> def filter=(value)
|
1303
1366
|
|
1304
1367
|
convert to string to support symbols
|
1305
1368
|
|
1306
1369
|
--
|
1307
1370
|
|
1308
|
-
##### [initialize](https://github.com/appium/ruby_lib/blob/
|
1371
|
+
##### [initialize](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/helper.rb#L168)
|
1309
1372
|
|
1310
1373
|
> def initialize
|
1311
1374
|
|
@@ -1317,7 +1380,7 @@ __Returns:__
|
|
1317
1380
|
|
1318
1381
|
--
|
1319
1382
|
|
1320
|
-
##### [reset](https://github.com/appium/ruby_lib/blob/
|
1383
|
+
##### [reset](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/helper.rb#L173)
|
1321
1384
|
|
1322
1385
|
> def reset
|
1323
1386
|
|
@@ -1325,7 +1388,7 @@ __Returns:__
|
|
1325
1388
|
|
1326
1389
|
--
|
1327
1390
|
|
1328
|
-
##### [result](https://github.com/appium/ruby_lib/blob/
|
1391
|
+
##### [result](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/helper.rb#L179)
|
1329
1392
|
|
1330
1393
|
> def result
|
1331
1394
|
|
@@ -1333,23 +1396,23 @@ __Returns:__
|
|
1333
1396
|
|
1334
1397
|
--
|
1335
1398
|
|
1336
|
-
##### [start_element](https://github.com/appium/ruby_lib/blob/
|
1399
|
+
##### [start_element](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/helper.rb#L195)
|
1337
1400
|
|
1338
|
-
> def start_element
|
1401
|
+
> def start_element(name, attrs = [])
|
1339
1402
|
|
1340
1403
|
|
1341
1404
|
|
1342
1405
|
--
|
1343
1406
|
|
1344
|
-
##### [end_element](https://github.com/appium/ruby_lib/blob/
|
1407
|
+
##### [end_element](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/helper.rb#L204)
|
1345
1408
|
|
1346
|
-
> def end_element
|
1409
|
+
> def end_element(name)
|
1347
1410
|
|
1348
1411
|
|
1349
1412
|
|
1350
1413
|
--
|
1351
1414
|
|
1352
|
-
##### [characters](https://github.com/appium/ruby_lib/blob/
|
1415
|
+
##### [characters](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/helper.rb#L210)
|
1353
1416
|
|
1354
1417
|
> def characters(chars)
|
1355
1418
|
|
@@ -1357,7 +1420,7 @@ __Returns:__
|
|
1357
1420
|
|
1358
1421
|
--
|
1359
1422
|
|
1360
|
-
##### [_no_such_element](https://github.com/appium/ruby_lib/blob/
|
1423
|
+
##### [_no_such_element](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/helper.rb#L217)
|
1361
1424
|
|
1362
1425
|
> def _no_such_element
|
1363
1426
|
|
@@ -1365,7 +1428,7 @@ __Returns:__
|
|
1365
1428
|
|
1366
1429
|
--
|
1367
1430
|
|
1368
|
-
##### [window_size](https://github.com/appium/ruby_lib/blob/
|
1431
|
+
##### [window_size](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/element/window.rb#L5)
|
1369
1432
|
|
1370
1433
|
> def window_size
|
1371
1434
|
|
@@ -1373,7 +1436,7 @@ Get the window's size
|
|
1373
1436
|
|
1374
1437
|
--
|
1375
1438
|
|
1376
|
-
##### [result](https://github.com/appium/ruby_lib/blob/
|
1439
|
+
##### [result](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/helper.rb#L6) android
|
1377
1440
|
|
1378
1441
|
> def result
|
1379
1442
|
|
@@ -1381,7 +1444,7 @@ Returns the value of attribute result
|
|
1381
1444
|
|
1382
1445
|
--
|
1383
1446
|
|
1384
|
-
##### [keys](https://github.com/appium/ruby_lib/blob/
|
1447
|
+
##### [keys](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/helper.rb#L6) android
|
1385
1448
|
|
1386
1449
|
> def keys
|
1387
1450
|
|
@@ -1389,7 +1452,7 @@ Returns the value of attribute keys
|
|
1389
1452
|
|
1390
1453
|
--
|
1391
1454
|
|
1392
|
-
##### [instance](https://github.com/appium/ruby_lib/blob/
|
1455
|
+
##### [instance](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/helper.rb#L6) android
|
1393
1456
|
|
1394
1457
|
> def instance
|
1395
1458
|
|
@@ -1397,23 +1460,23 @@ Returns the value of attribute instance
|
|
1397
1460
|
|
1398
1461
|
--
|
1399
1462
|
|
1400
|
-
##### [filter](https://github.com/appium/ruby_lib/blob/
|
1463
|
+
##### [filter](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/helper.rb#L6) android
|
1401
1464
|
|
1402
1465
|
> def filter
|
1403
1466
|
|
1404
|
-
|
1467
|
+
Returns the value of attribute filter
|
1405
1468
|
|
1406
1469
|
--
|
1407
1470
|
|
1408
|
-
##### [filter=](https://github.com/appium/ruby_lib/blob/
|
1471
|
+
##### [filter=](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/helper.rb#L9) android
|
1409
1472
|
|
1410
|
-
> def filter=
|
1473
|
+
> def filter=(value)
|
1411
1474
|
|
1412
1475
|
convert to string to support symbols
|
1413
1476
|
|
1414
1477
|
--
|
1415
1478
|
|
1416
|
-
##### [initialize](https://github.com/appium/ruby_lib/blob/
|
1479
|
+
##### [initialize](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/helper.rb#L15) android
|
1417
1480
|
|
1418
1481
|
> def initialize
|
1419
1482
|
|
@@ -1425,7 +1488,7 @@ __Returns:__
|
|
1425
1488
|
|
1426
1489
|
--
|
1427
1490
|
|
1428
|
-
##### [reset](https://github.com/appium/ruby_lib/blob/
|
1491
|
+
##### [reset](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/helper.rb#L21) android
|
1429
1492
|
|
1430
1493
|
> def reset
|
1431
1494
|
|
@@ -1433,17 +1496,17 @@ __Returns:__
|
|
1433
1496
|
|
1434
1497
|
--
|
1435
1498
|
|
1436
|
-
##### [start_element](https://github.com/appium/ruby_lib/blob/
|
1499
|
+
##### [start_element](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/helper.rb#L28) android
|
1437
1500
|
|
1438
|
-
> def start_element
|
1501
|
+
> def start_element(name, attrs = [])
|
1439
1502
|
|
1440
1503
|
http://nokogiri.org/Nokogiri/XML/SAX/Document.html
|
1441
1504
|
|
1442
1505
|
--
|
1443
1506
|
|
1444
|
-
##### [_fix_android_native_source](https://github.com/appium/ruby_lib/blob/
|
1507
|
+
##### [_fix_android_native_source](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/helper.rb#L88) android
|
1445
1508
|
|
1446
|
-
> def _fix_android_native_source
|
1509
|
+
> def _fix_android_native_source(source)
|
1447
1510
|
|
1448
1511
|
Fix uiautomator's xml dump.
|
1449
1512
|
https://github.com/appium/appium/issues/2822
|
@@ -1451,7 +1514,7 @@ https://code.google.com/p/android/issues/detail?id=74143
|
|
1451
1514
|
|
1452
1515
|
--
|
1453
1516
|
|
1454
|
-
##### [source](https://github.com/appium/ruby_lib/blob/
|
1517
|
+
##### [source](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/helper.rb#L116) android
|
1455
1518
|
|
1456
1519
|
> def source
|
1457
1520
|
|
@@ -1463,9 +1526,9 @@ __Returns:__
|
|
1463
1526
|
|
1464
1527
|
--
|
1465
1528
|
|
1466
|
-
##### [get_android_inspect](https://github.com/appium/ruby_lib/blob/
|
1529
|
+
##### [get_android_inspect](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/helper.rb#L126) android
|
1467
1530
|
|
1468
|
-
> def get_android_inspect
|
1531
|
+
> def get_android_inspect(class_name = false)
|
1469
1532
|
|
1470
1533
|
Android only.
|
1471
1534
|
Returns a string containing interesting elements.
|
@@ -1482,9 +1545,9 @@ __Returns:__
|
|
1482
1545
|
|
1483
1546
|
--
|
1484
1547
|
|
1485
|
-
##### [page](https://github.com/appium/ruby_lib/blob/
|
1548
|
+
##### [page](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/helper.rb#L152) android
|
1486
1549
|
|
1487
|
-
> def page
|
1550
|
+
> def page(opts = {})
|
1488
1551
|
|
1489
1552
|
Intended for use with console.
|
1490
1553
|
Inspects and prints the current page.
|
@@ -1501,18 +1564,19 @@ __Returns:__
|
|
1501
1564
|
|
1502
1565
|
--
|
1503
1566
|
|
1504
|
-
##### [current_app](https://github.com/appium/ruby_lib/blob/
|
1567
|
+
##### [current_app](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/helper.rb#L164) android
|
1505
1568
|
|
1506
1569
|
> def current_app
|
1507
1570
|
|
1508
1571
|
example line:
|
1509
|
-
"mFocusedApp=AppWindowToken{b1420058 token=Token{b128add0
|
1572
|
+
"mFocusedApp=AppWindowToken{b1420058 token=Token{b128add0
|
1573
|
+
ActivityRecord{b1264d10 u0 com.example.android.apis/.ApiDemos t23}}}"
|
1510
1574
|
|
1511
1575
|
--
|
1512
1576
|
|
1513
|
-
##### [id](https://github.com/appium/ruby_lib/blob/
|
1577
|
+
##### [id](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/helper.rb#L188) android
|
1514
1578
|
|
1515
|
-
> def id
|
1579
|
+
> def id(id)
|
1516
1580
|
|
1517
1581
|
Find the first matching element by id
|
1518
1582
|
|
@@ -1526,9 +1590,9 @@ __Returns:__
|
|
1526
1590
|
|
1527
1591
|
--
|
1528
1592
|
|
1529
|
-
##### [ids](https://github.com/appium/ruby_lib/blob/
|
1593
|
+
##### [ids](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/helper.rb#L196) android
|
1530
1594
|
|
1531
|
-
> def ids
|
1595
|
+
> def ids(id)
|
1532
1596
|
|
1533
1597
|
Find all matching elements by id
|
1534
1598
|
|
@@ -1542,9 +1606,9 @@ __Returns:__
|
|
1542
1606
|
|
1543
1607
|
--
|
1544
1608
|
|
1545
|
-
##### [ele_index](https://github.com/appium/ruby_lib/blob/
|
1609
|
+
##### [ele_index](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/helper.rb#L205) android
|
1546
1610
|
|
1547
|
-
> def ele_index
|
1611
|
+
> def ele_index(class_name, index)
|
1548
1612
|
|
1549
1613
|
Find the element of type class_name at matching index.
|
1550
1614
|
|
@@ -1560,9 +1624,9 @@ __Returns:__
|
|
1560
1624
|
|
1561
1625
|
--
|
1562
1626
|
|
1563
|
-
##### [first_ele](https://github.com/appium/ruby_lib/blob/
|
1627
|
+
##### [first_ele](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/helper.rb#L223) android
|
1564
1628
|
|
1565
|
-
> def first_ele
|
1629
|
+
> def first_ele(class_name)
|
1566
1630
|
|
1567
1631
|
Find the first element that matches class_name
|
1568
1632
|
|
@@ -1576,9 +1640,9 @@ __Returns:__
|
|
1576
1640
|
|
1577
1641
|
--
|
1578
1642
|
|
1579
|
-
##### [last_ele](https://github.com/appium/ruby_lib/blob/
|
1643
|
+
##### [last_ele](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/helper.rb#L230) android
|
1580
1644
|
|
1581
|
-
> def last_ele
|
1645
|
+
> def last_ele(class_name)
|
1582
1646
|
|
1583
1647
|
Find the last element that matches class_name
|
1584
1648
|
|
@@ -1592,9 +1656,9 @@ __Returns:__
|
|
1592
1656
|
|
1593
1657
|
--
|
1594
1658
|
|
1595
|
-
##### [tag](https://github.com/appium/ruby_lib/blob/
|
1659
|
+
##### [tag](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/helper.rb#L238) android
|
1596
1660
|
|
1597
|
-
> def tag
|
1661
|
+
> def tag(class_name)
|
1598
1662
|
|
1599
1663
|
Find the first element of type class_name
|
1600
1664
|
|
@@ -1608,9 +1672,9 @@ __Returns:__
|
|
1608
1672
|
|
1609
1673
|
--
|
1610
1674
|
|
1611
|
-
##### [tags](https://github.com/appium/ruby_lib/blob/
|
1675
|
+
##### [tags](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/helper.rb#L246) android
|
1612
1676
|
|
1613
|
-
> def tags
|
1677
|
+
> def tags(class_name)
|
1614
1678
|
|
1615
1679
|
Find all elements of type class_name
|
1616
1680
|
|
@@ -1624,9 +1688,29 @@ __Returns:__
|
|
1624
1688
|
|
1625
1689
|
--
|
1626
1690
|
|
1627
|
-
##### [
|
1691
|
+
##### [string_visible_contains](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/helper.rb#L288) android
|
1692
|
+
|
1693
|
+
> def string_visible_contains(class_name, value)
|
1694
|
+
|
1695
|
+
Returns a string that matches the first element that contains value
|
1696
|
+
|
1697
|
+
example: complex_find_contains 'UIATextField', 'sign in'
|
1698
|
+
|
1699
|
+
__Parameters:__
|
1700
|
+
|
1701
|
+
[String] class_name - the class name for the element
|
1702
|
+
|
1703
|
+
[String] value - the value to search for
|
1704
|
+
|
1705
|
+
__Returns:__
|
1706
|
+
|
1707
|
+
[String]
|
1708
|
+
|
1709
|
+
--
|
1710
|
+
|
1711
|
+
##### [complex_find_contains](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/helper.rb#L308) android
|
1628
1712
|
|
1629
|
-
> def complex_find_contains
|
1713
|
+
> def complex_find_contains(element, value)
|
1630
1714
|
|
1631
1715
|
Find the first element that contains value
|
1632
1716
|
|
@@ -1642,9 +1726,9 @@ __Returns:__
|
|
1642
1726
|
|
1643
1727
|
--
|
1644
1728
|
|
1645
|
-
##### [complex_finds_contains](https://github.com/appium/ruby_lib/blob/
|
1729
|
+
##### [complex_finds_contains](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/helper.rb#L316) android
|
1646
1730
|
|
1647
|
-
> def complex_finds_contains
|
1731
|
+
> def complex_finds_contains(element, value)
|
1648
1732
|
|
1649
1733
|
Find all elements containing value
|
1650
1734
|
|
@@ -1660,9 +1744,9 @@ __Returns:__
|
|
1660
1744
|
|
1661
1745
|
--
|
1662
1746
|
|
1663
|
-
##### [complex_find_exact](https://github.com/appium/ruby_lib/blob/
|
1747
|
+
##### [complex_find_exact](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/helper.rb#L345) android
|
1664
1748
|
|
1665
|
-
> def complex_find_exact
|
1749
|
+
> def complex_find_exact(class_name, value)
|
1666
1750
|
|
1667
1751
|
Find the first element exactly matching value
|
1668
1752
|
|
@@ -1678,9 +1762,9 @@ __Returns:__
|
|
1678
1762
|
|
1679
1763
|
--
|
1680
1764
|
|
1681
|
-
##### [complex_finds_exact](https://github.com/appium/ruby_lib/blob/
|
1765
|
+
##### [complex_finds_exact](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/helper.rb#L353) android
|
1682
1766
|
|
1683
|
-
> def complex_finds_exact
|
1767
|
+
> def complex_finds_exact(class_name, value)
|
1684
1768
|
|
1685
1769
|
Find all elements exactly matching value
|
1686
1770
|
|
@@ -1696,7 +1780,7 @@ __Returns:__
|
|
1696
1780
|
|
1697
1781
|
--
|
1698
1782
|
|
1699
|
-
##### [get_source](https://github.com/appium/ruby_lib/blob/
|
1783
|
+
##### [get_source](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/helper.rb#L361) android
|
1700
1784
|
|
1701
1785
|
> def get_source
|
1702
1786
|
|
@@ -1710,7 +1794,7 @@ __Returns:__
|
|
1710
1794
|
|
1711
1795
|
--
|
1712
1796
|
|
1713
|
-
##### [TextView](https://github.com/appium/ruby_lib/blob/
|
1797
|
+
##### [TextView](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/text.rb#L4) android
|
1714
1798
|
|
1715
1799
|
> TextView = 'android.widget.TextView'
|
1716
1800
|
|
@@ -1718,9 +1802,9 @@ __Returns:__
|
|
1718
1802
|
|
1719
1803
|
--
|
1720
1804
|
|
1721
|
-
##### [text](https://github.com/appium/ruby_lib/blob/
|
1805
|
+
##### [text](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/text.rb#L10) android
|
1722
1806
|
|
1723
|
-
> def text
|
1807
|
+
> def text(value)
|
1724
1808
|
|
1725
1809
|
Find the first TextView that contains value or by index.
|
1726
1810
|
If int then the TextView at that index is returned.
|
@@ -1735,9 +1819,9 @@ __Returns:__
|
|
1735
1819
|
|
1736
1820
|
--
|
1737
1821
|
|
1738
|
-
##### [texts](https://github.com/appium/ruby_lib/blob/
|
1822
|
+
##### [texts](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/text.rb#L19) android
|
1739
1823
|
|
1740
|
-
> def texts
|
1824
|
+
> def texts(value = false)
|
1741
1825
|
|
1742
1826
|
Find all TextViews containing value.
|
1743
1827
|
If value is omitted, all texts are returned.
|
@@ -1752,7 +1836,7 @@ __Returns:__
|
|
1752
1836
|
|
1753
1837
|
--
|
1754
1838
|
|
1755
|
-
##### [first_text](https://github.com/appium/ruby_lib/blob/
|
1839
|
+
##### [first_text](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/text.rb#L26) android
|
1756
1840
|
|
1757
1841
|
> def first_text
|
1758
1842
|
|
@@ -1764,7 +1848,7 @@ __Returns:__
|
|
1764
1848
|
|
1765
1849
|
--
|
1766
1850
|
|
1767
|
-
##### [last_text](https://github.com/appium/ruby_lib/blob/
|
1851
|
+
##### [last_text](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/text.rb#L32) android
|
1768
1852
|
|
1769
1853
|
> def last_text
|
1770
1854
|
|
@@ -1776,9 +1860,9 @@ __Returns:__
|
|
1776
1860
|
|
1777
1861
|
--
|
1778
1862
|
|
1779
|
-
##### [text_exact](https://github.com/appium/ruby_lib/blob/
|
1863
|
+
##### [text_exact](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/text.rb#L39) android
|
1780
1864
|
|
1781
|
-
> def text_exact
|
1865
|
+
> def text_exact(value)
|
1782
1866
|
|
1783
1867
|
Find the first TextView that exactly matches value.
|
1784
1868
|
|
@@ -1792,9 +1876,9 @@ __Returns:__
|
|
1792
1876
|
|
1793
1877
|
--
|
1794
1878
|
|
1795
|
-
##### [texts_exact](https://github.com/appium/ruby_lib/blob/
|
1879
|
+
##### [texts_exact](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/text.rb#L46) android
|
1796
1880
|
|
1797
|
-
> def texts_exact
|
1881
|
+
> def texts_exact(value)
|
1798
1882
|
|
1799
1883
|
Find all TextViews that exactly match value.
|
1800
1884
|
|
@@ -1808,41 +1892,41 @@ __Returns:__
|
|
1808
1892
|
|
1809
1893
|
--
|
1810
1894
|
|
1811
|
-
##### [_nodeset_to_uiselector](https://github.com/appium/ruby_lib/blob/
|
1895
|
+
##### [_nodeset_to_uiselector](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/client_xpath.rb#L5) android
|
1812
1896
|
|
1813
|
-
> def _nodeset_to_uiselector
|
1897
|
+
> def _nodeset_to_uiselector(opts = {})
|
1814
1898
|
|
1815
1899
|
|
1816
1900
|
|
1817
1901
|
--
|
1818
1902
|
|
1819
|
-
##### [_client_xpath](https://github.com/appium/ruby_lib/blob/
|
1903
|
+
##### [_client_xpath](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/client_xpath.rb#L20) android
|
1820
1904
|
|
1821
|
-
> def _client_xpath
|
1905
|
+
> def _client_xpath(opts = {})
|
1822
1906
|
|
1823
1907
|
|
1824
1908
|
|
1825
1909
|
--
|
1826
1910
|
|
1827
|
-
##### [client_xpath](https://github.com/appium/ruby_lib/blob/
|
1911
|
+
##### [client_xpath](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/client_xpath.rb#L36) android
|
1828
1912
|
|
1829
|
-
> def client_xpath
|
1913
|
+
> def client_xpath(xpath)
|
1830
1914
|
|
1831
1915
|
|
1832
1916
|
|
1833
1917
|
--
|
1834
1918
|
|
1835
|
-
##### [client_xpaths](https://github.com/appium/ruby_lib/blob/
|
1919
|
+
##### [client_xpaths](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/client_xpath.rb#L40) android
|
1836
1920
|
|
1837
|
-
> def client_xpaths
|
1921
|
+
> def client_xpaths(xpath)
|
1838
1922
|
|
1839
1923
|
|
1840
1924
|
|
1841
1925
|
--
|
1842
1926
|
|
1843
|
-
##### [alert_click](https://github.com/appium/ruby_lib/blob/
|
1927
|
+
##### [alert_click](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/alert.rb#L6) android
|
1844
1928
|
|
1845
|
-
> def alert_click
|
1929
|
+
> def alert_click(value)
|
1846
1930
|
|
1847
1931
|
Click the first alert button that contains value or by index.
|
1848
1932
|
|
@@ -1856,7 +1940,7 @@ __Returns:__
|
|
1856
1940
|
|
1857
1941
|
--
|
1858
1942
|
|
1859
|
-
##### [alert_accept](https://github.com/appium/ruby_lib/blob/
|
1943
|
+
##### [alert_accept](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/alert.rb#L13) android
|
1860
1944
|
|
1861
1945
|
> def alert_accept
|
1862
1946
|
|
@@ -1869,7 +1953,7 @@ __Returns:__
|
|
1869
1953
|
|
1870
1954
|
--
|
1871
1955
|
|
1872
|
-
##### [alert_accept_text](https://github.com/appium/ruby_lib/blob/
|
1956
|
+
##### [alert_accept_text](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/alert.rb#L20) android
|
1873
1957
|
|
1874
1958
|
> def alert_accept_text
|
1875
1959
|
|
@@ -1882,7 +1966,7 @@ __Returns:__
|
|
1882
1966
|
|
1883
1967
|
--
|
1884
1968
|
|
1885
|
-
##### [alert_dismiss](https://github.com/appium/ruby_lib/blob/
|
1969
|
+
##### [alert_dismiss](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/alert.rb#L27) android
|
1886
1970
|
|
1887
1971
|
> def alert_dismiss
|
1888
1972
|
|
@@ -1895,7 +1979,7 @@ __Returns:__
|
|
1895
1979
|
|
1896
1980
|
--
|
1897
1981
|
|
1898
|
-
##### [alert_dismiss_text](https://github.com/appium/ruby_lib/blob/
|
1982
|
+
##### [alert_dismiss_text](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/alert.rb#L34) android
|
1899
1983
|
|
1900
1984
|
> def alert_dismiss_text
|
1901
1985
|
|
@@ -1908,7 +1992,7 @@ __Returns:__
|
|
1908
1992
|
|
1909
1993
|
--
|
1910
1994
|
|
1911
|
-
##### [uiautomator_find](https://github.com/appium/ruby_lib/blob/
|
1995
|
+
##### [uiautomator_find](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/mobile_methods.rb#L10) android
|
1912
1996
|
|
1913
1997
|
> def uiautomator_find
|
1914
1998
|
|
@@ -1920,7 +2004,7 @@ find_element/s can be used with a [UISelector](http://developer.android.com/tool
|
|
1920
2004
|
|
1921
2005
|
--
|
1922
2006
|
|
1923
|
-
##### [Button](https://github.com/appium/ruby_lib/blob/
|
2007
|
+
##### [Button](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/button.rb#L4) android
|
1924
2008
|
|
1925
2009
|
> Button = 'android.widget.Button'
|
1926
2010
|
|
@@ -1928,7 +2012,7 @@ find_element/s can be used with a [UISelector](http://developer.android.com/tool
|
|
1928
2012
|
|
1929
2013
|
--
|
1930
2014
|
|
1931
|
-
##### [ImageButton](https://github.com/appium/ruby_lib/blob/
|
2015
|
+
##### [ImageButton](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/button.rb#L5) android
|
1932
2016
|
|
1933
2017
|
> ImageButton = 'android.widget.ImageButton'
|
1934
2018
|
|
@@ -1936,9 +2020,9 @@ find_element/s can be used with a [UISelector](http://developer.android.com/tool
|
|
1936
2020
|
|
1937
2021
|
--
|
1938
2022
|
|
1939
|
-
##### [button](https://github.com/appium/ruby_lib/blob/
|
2023
|
+
##### [button](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/button.rb#L43) android
|
1940
2024
|
|
1941
|
-
> def button
|
2025
|
+
> def button(value)
|
1942
2026
|
|
1943
2027
|
Find the first button that contains value or by index.
|
1944
2028
|
If int then the button at that index is returned.
|
@@ -1953,9 +2037,9 @@ __Returns:__
|
|
1953
2037
|
|
1954
2038
|
--
|
1955
2039
|
|
1956
|
-
##### [buttons](https://github.com/appium/ruby_lib/blob/
|
2040
|
+
##### [buttons](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/button.rb#L60) android
|
1957
2041
|
|
1958
|
-
> def buttons
|
2042
|
+
> def buttons(value = false)
|
1959
2043
|
|
1960
2044
|
Find all buttons containing value.
|
1961
2045
|
If value is omitted, all buttons are returned.
|
@@ -1970,7 +2054,7 @@ __Returns:__
|
|
1970
2054
|
|
1971
2055
|
--
|
1972
2056
|
|
1973
|
-
##### [first_button](https://github.com/appium/ruby_lib/blob/
|
2057
|
+
##### [first_button](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/button.rb#L67) android
|
1974
2058
|
|
1975
2059
|
> def first_button
|
1976
2060
|
|
@@ -1982,7 +2066,7 @@ __Returns:__
|
|
1982
2066
|
|
1983
2067
|
--
|
1984
2068
|
|
1985
|
-
##### [last_button](https://github.com/appium/ruby_lib/blob/
|
2069
|
+
##### [last_button](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/button.rb#L73) android
|
1986
2070
|
|
1987
2071
|
> def last_button
|
1988
2072
|
|
@@ -1994,9 +2078,9 @@ __Returns:__
|
|
1994
2078
|
|
1995
2079
|
--
|
1996
2080
|
|
1997
|
-
##### [button_exact](https://github.com/appium/ruby_lib/blob/
|
2081
|
+
##### [button_exact](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/button.rb#L89) android
|
1998
2082
|
|
1999
|
-
> def button_exact
|
2083
|
+
> def button_exact(value)
|
2000
2084
|
|
2001
2085
|
Find the first button that exactly matches value.
|
2002
2086
|
|
@@ -2010,9 +2094,9 @@ __Returns:__
|
|
2010
2094
|
|
2011
2095
|
--
|
2012
2096
|
|
2013
|
-
##### [buttons_exact](https://github.com/appium/ruby_lib/blob/
|
2097
|
+
##### [buttons_exact](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/button.rb#L96) android
|
2014
2098
|
|
2015
|
-
> def buttons_exact
|
2099
|
+
> def buttons_exact(value)
|
2016
2100
|
|
2017
2101
|
Find all buttons that exactly match value.
|
2018
2102
|
|
@@ -2026,9 +2110,9 @@ __Returns:__
|
|
2026
2110
|
|
2027
2111
|
--
|
2028
2112
|
|
2029
|
-
##### [find](https://github.com/appium/ruby_lib/blob/
|
2113
|
+
##### [find](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/generic.rb#L6) android
|
2030
2114
|
|
2031
|
-
> def find
|
2115
|
+
> def find(value)
|
2032
2116
|
|
2033
2117
|
Find the first element containing value
|
2034
2118
|
|
@@ -2042,9 +2126,9 @@ __Returns:__
|
|
2042
2126
|
|
2043
2127
|
--
|
2044
2128
|
|
2045
|
-
##### [finds](https://github.com/appium/ruby_lib/blob/
|
2129
|
+
##### [finds](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/generic.rb#L13) android
|
2046
2130
|
|
2047
|
-
> def finds
|
2131
|
+
> def finds(value)
|
2048
2132
|
|
2049
2133
|
Find all elements containing value
|
2050
2134
|
|
@@ -2058,9 +2142,9 @@ __Returns:__
|
|
2058
2142
|
|
2059
2143
|
--
|
2060
2144
|
|
2061
|
-
##### [find_exact](https://github.com/appium/ruby_lib/blob/
|
2145
|
+
##### [find_exact](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/generic.rb#L20) android
|
2062
2146
|
|
2063
|
-
> def find_exact
|
2147
|
+
> def find_exact(value)
|
2064
2148
|
|
2065
2149
|
Find the first element exactly matching value
|
2066
2150
|
|
@@ -2074,9 +2158,9 @@ __Returns:__
|
|
2074
2158
|
|
2075
2159
|
--
|
2076
2160
|
|
2077
|
-
##### [finds_exact](https://github.com/appium/ruby_lib/blob/
|
2161
|
+
##### [finds_exact](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/generic.rb#L27) android
|
2078
2162
|
|
2079
|
-
> def finds_exact
|
2163
|
+
> def finds_exact(value)
|
2080
2164
|
|
2081
2165
|
Find all elements exactly matching value
|
2082
2166
|
|
@@ -2090,9 +2174,9 @@ __Returns:__
|
|
2090
2174
|
|
2091
2175
|
--
|
2092
2176
|
|
2093
|
-
##### [scroll_to](https://github.com/appium/ruby_lib/blob/
|
2177
|
+
##### [scroll_to](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/generic.rb#L39) android
|
2094
2178
|
|
2095
|
-
> def scroll_to
|
2179
|
+
> def scroll_to(text)
|
2096
2180
|
|
2097
2181
|
Scroll to the first element containing target text or description.
|
2098
2182
|
|
@@ -2106,9 +2190,9 @@ __Returns:__
|
|
2106
2190
|
|
2107
2191
|
--
|
2108
2192
|
|
2109
|
-
##### [scroll_to_exact](https://github.com/appium/ruby_lib/blob/
|
2193
|
+
##### [scroll_to_exact](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/generic.rb#L51) android
|
2110
2194
|
|
2111
|
-
> def scroll_to_exact
|
2195
|
+
> def scroll_to_exact(text)
|
2112
2196
|
|
2113
2197
|
Scroll to the first element with the exact target text or description.
|
2114
2198
|
|
@@ -2122,7 +2206,7 @@ __Returns:__
|
|
2122
2206
|
|
2123
2207
|
--
|
2124
2208
|
|
2125
|
-
##### [EditText](https://github.com/appium/ruby_lib/blob/
|
2209
|
+
##### [EditText](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/textfield.rb#L3) android
|
2126
2210
|
|
2127
2211
|
> EditText = 'android.widget.EditText'
|
2128
2212
|
|
@@ -2130,9 +2214,9 @@ __Returns:__
|
|
2130
2214
|
|
2131
2215
|
--
|
2132
2216
|
|
2133
|
-
##### [textfield](https://github.com/appium/ruby_lib/blob/
|
2217
|
+
##### [textfield](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/textfield.rb#L9) android
|
2134
2218
|
|
2135
|
-
> def textfield
|
2219
|
+
> def textfield(value)
|
2136
2220
|
|
2137
2221
|
Find the first EditText that contains value or by index.
|
2138
2222
|
If int then the EditText at that index is returned.
|
@@ -2147,9 +2231,9 @@ __Returns:__
|
|
2147
2231
|
|
2148
2232
|
--
|
2149
2233
|
|
2150
|
-
##### [textfields](https://github.com/appium/ruby_lib/blob/
|
2234
|
+
##### [textfields](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/textfield.rb#L18) android
|
2151
2235
|
|
2152
|
-
> def textfields
|
2236
|
+
> def textfields(value = false)
|
2153
2237
|
|
2154
2238
|
Find all EditTexts containing value.
|
2155
2239
|
If value is omitted, all EditTexts are returned.
|
@@ -2164,7 +2248,7 @@ __Returns:__
|
|
2164
2248
|
|
2165
2249
|
--
|
2166
2250
|
|
2167
|
-
##### [first_textfield](https://github.com/appium/ruby_lib/blob/
|
2251
|
+
##### [first_textfield](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/textfield.rb#L25) android
|
2168
2252
|
|
2169
2253
|
> def first_textfield
|
2170
2254
|
|
@@ -2176,7 +2260,7 @@ __Returns:__
|
|
2176
2260
|
|
2177
2261
|
--
|
2178
2262
|
|
2179
|
-
##### [last_textfield](https://github.com/appium/ruby_lib/blob/
|
2263
|
+
##### [last_textfield](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/textfield.rb#L31) android
|
2180
2264
|
|
2181
2265
|
> def last_textfield
|
2182
2266
|
|
@@ -2188,9 +2272,9 @@ __Returns:__
|
|
2188
2272
|
|
2189
2273
|
--
|
2190
2274
|
|
2191
|
-
##### [textfield_exact](https://github.com/appium/ruby_lib/blob/
|
2275
|
+
##### [textfield_exact](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/textfield.rb#L38) android
|
2192
2276
|
|
2193
|
-
> def textfield_exact
|
2277
|
+
> def textfield_exact(value)
|
2194
2278
|
|
2195
2279
|
Find the first EditText that exactly matches value.
|
2196
2280
|
|
@@ -2204,9 +2288,9 @@ __Returns:__
|
|
2204
2288
|
|
2205
2289
|
--
|
2206
2290
|
|
2207
|
-
##### [textfields_exact](https://github.com/appium/ruby_lib/blob/
|
2291
|
+
##### [textfields_exact](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/android/element/textfield.rb#L45) android
|
2208
2292
|
|
2209
|
-
> def textfields_exact
|
2293
|
+
> def textfields_exact(value)
|
2210
2294
|
|
2211
2295
|
Find all EditTexts that exactly match value.
|
2212
2296
|
|
@@ -2220,7 +2304,7 @@ __Returns:__
|
|
2220
2304
|
|
2221
2305
|
--
|
2222
2306
|
|
2223
|
-
##### [value](https://github.com/appium/ruby_lib/blob/
|
2307
|
+
##### [value](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/patch.rb#L12)
|
2224
2308
|
|
2225
2309
|
> def value
|
2226
2310
|
|
@@ -2230,7 +2314,7 @@ Fixes NoMethodError: undefined method `value' for Selenium::WebDriver::Element
|
|
2230
2314
|
|
2231
2315
|
--
|
2232
2316
|
|
2233
|
-
##### [name](https://github.com/appium/ruby_lib/blob/
|
2317
|
+
##### [name](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/patch.rb#L19)
|
2234
2318
|
|
2235
2319
|
> def name
|
2236
2320
|
|
@@ -2240,7 +2324,7 @@ Fixes NoMethodError: undefined method `name' for Selenium::WebDriver::Element
|
|
2240
2324
|
|
2241
2325
|
--
|
2242
2326
|
|
2243
|
-
##### [location_rel](https://github.com/appium/ruby_lib/blob/
|
2327
|
+
##### [location_rel](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/patch.rb#L31)
|
2244
2328
|
|
2245
2329
|
> def location_rel
|
2246
2330
|
|
@@ -2258,7 +2342,7 @@ __Returns:__
|
|
2258
2342
|
|
2259
2343
|
--
|
2260
2344
|
|
2261
|
-
##### [DEFAULT_HEADERS](https://github.com/appium/ruby_lib/blob/
|
2345
|
+
##### [DEFAULT_HEADERS](https://github.com/appium/ruby_lib/blob/af838966d0724793d3dbfa35798ca6dd9f8a3143/lib/appium_lib/common/patch.rb#L147)
|
2262
2346
|
|
2263
2347
|
> DEFAULT_HEADERS = { 'Accept' => CONTENT_TYPE, 'User-Agent' => "appium/ruby_lib/#{::Appium::VERSION}" }
|
2264
2348
|
|