appium_lib 9.4.5 → 9.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/appium_lib.gemspec +1 -1
- data/docs/android_docs.md +224 -224
- data/docs/ios_docs.md +250 -250
- data/lib/appium_lib/common/version.rb +1 -1
- data/release_notes.md +13 -0
- metadata +1 -109
- data/android_tests/Gemfile +0 -2
- data/android_tests/LICENSE-2.0.txt +0 -202
- data/android_tests/Rakefile +0 -68
- data/android_tests/api.apk +0 -0
- data/android_tests/appium.txt +0 -11
- data/android_tests/flaky.txt +0 -1
- data/android_tests/lib/android/specs/android/element/alert.rb +0 -48
- data/android_tests/lib/android/specs/android/element/button.rb +0 -52
- data/android_tests/lib/android/specs/android/element/generic.rb +0 -58
- data/android_tests/lib/android/specs/android/element/text.rb +0 -35
- data/android_tests/lib/android/specs/android/element/textfield.rb +0 -62
- data/android_tests/lib/android/specs/android/helper.rb +0 -111
- data/android_tests/lib/android/specs/android/patch.rb +0 -27
- data/android_tests/lib/android/specs/common/command.rb +0 -52
- data/android_tests/lib/android/specs/common/device.rb +0 -159
- data/android_tests/lib/android/specs/common/device_touchaction.rb +0 -34
- data/android_tests/lib/android/specs/common/element/window.rb +0 -11
- data/android_tests/lib/android/specs/common/helper.rb +0 -112
- data/android_tests/lib/android/specs/common/patch.rb +0 -78
- data/android_tests/lib/android/specs/common/version.rb +0 -9
- data/android_tests/lib/android/specs/common/web_context.rb +0 -60
- data/android_tests/lib/android/specs/device/touch_actions.rb +0 -71
- data/android_tests/lib/android/specs/driver.rb +0 -280
- data/android_tests/lib/android/specs/install.rb +0 -26
- data/android_tests/lib/format.rb +0 -47
- data/android_tests/lib/run.rb +0 -91
- data/android_tests/readme.md +0 -30
- data/grid/README.md +0 -21
- data/grid/appium.txt.ios.example +0 -15
- data/grid/config.json +0 -25
- data/grid/hub_config.json +0 -14
- data/grid/selenium-server-standalone-2.53.1.jar +0 -0
- data/grid/selenium-server-standalone-3.2.0.jar +0 -0
- data/ios_tests/Gemfile +0 -4
- data/ios_tests/LICENSE-2.0.txt +0 -202
- data/ios_tests/Rakefile +0 -54
- data/ios_tests/UICatalog.app.zip +0 -0
- data/ios_tests/UICatalog.app/12-6AM.png +0 -0
- data/ios_tests/UICatalog.app/12-6PM.png +0 -0
- data/ios_tests/UICatalog.app/6-12AM.png +0 -0
- data/ios_tests/UICatalog.app/6-12PM.png +0 -0
- data/ios_tests/UICatalog.app/Default-568h@2x.png +0 -0
- data/ios_tests/UICatalog.app/Default@2x.png +0 -0
- data/ios_tests/UICatalog.app/Info.plist +0 -0
- data/ios_tests/UICatalog.app/PkgInfo +0 -1
- data/ios_tests/UICatalog.app/UIButton_custom.png +0 -0
- data/ios_tests/UICatalog.app/UICatalog +0 -0
- data/ios_tests/UICatalog.app/blueButton.png +0 -0
- data/ios_tests/UICatalog.app/bookmarkImage.png +0 -0
- data/ios_tests/UICatalog.app/bookmarkImageHighlighted.png +0 -0
- data/ios_tests/UICatalog.app/divider.png +0 -0
- data/ios_tests/UICatalog.app/en.lproj/AlertsViewController.nib +0 -0
- data/ios_tests/UICatalog.app/en.lproj/ButtonsViewController.nib +0 -0
- data/ios_tests/UICatalog.app/en.lproj/ControlsViewController.nib +0 -0
- data/ios_tests/UICatalog.app/en.lproj/ImagesViewController.nib +0 -0
- data/ios_tests/UICatalog.app/en.lproj/Localizable.strings +0 -0
- data/ios_tests/UICatalog.app/en.lproj/MainWindow.nib +0 -0
- data/ios_tests/UICatalog.app/en.lproj/PickerViewController.nib +0 -0
- data/ios_tests/UICatalog.app/en.lproj/SearchBarController.nib +0 -0
- data/ios_tests/UICatalog.app/en.lproj/SegmentViewController.nib +0 -0
- data/ios_tests/UICatalog.app/en.lproj/TextFieldController.nib +0 -0
- data/ios_tests/UICatalog.app/en.lproj/TextViewController.nib +0 -0
- data/ios_tests/UICatalog.app/en.lproj/ToolbarViewController.nib +0 -0
- data/ios_tests/UICatalog.app/en.lproj/TransitionViewController.nib +0 -0
- data/ios_tests/UICatalog.app/en.lproj/WebViewController.nib +0 -0
- data/ios_tests/UICatalog.app/orangeslide.png +0 -0
- data/ios_tests/UICatalog.app/scene1.jpg +0 -0
- data/ios_tests/UICatalog.app/scene2.jpg +0 -0
- data/ios_tests/UICatalog.app/scene3.jpg +0 -0
- data/ios_tests/UICatalog.app/scene4.jpg +0 -0
- data/ios_tests/UICatalog.app/scene5.jpg +0 -0
- data/ios_tests/UICatalog.app/searchBarBackground.png +0 -0
- data/ios_tests/UICatalog.app/segment_check.png +0 -0
- data/ios_tests/UICatalog.app/segment_search.png +0 -0
- data/ios_tests/UICatalog.app/segment_tools.png +0 -0
- data/ios_tests/UICatalog.app/segmentedBackground.png +0 -0
- data/ios_tests/UICatalog.app/slider_ball.png +0 -0
- data/ios_tests/UICatalog.app/toolbarBackground.png +0 -0
- data/ios_tests/UICatalog.app/whiteButton.png +0 -0
- data/ios_tests/UICatalog.app/yellowslide.png +0 -0
- data/ios_tests/appium.txt +0 -15
- data/ios_tests/data/unicode.txt +0 -1
- data/ios_tests/flaky.txt +0 -1
- data/ios_tests/lib/common.rb +0 -84
- data/ios_tests/lib/format.rb +0 -23
- data/ios_tests/lib/ios/specs/common/command.rb +0 -45
- data/ios_tests/lib/ios/specs/common/element/window.rb +0 -17
- data/ios_tests/lib/ios/specs/common/helper.rb +0 -228
- data/ios_tests/lib/ios/specs/common/patch.rb +0 -54
- data/ios_tests/lib/ios/specs/common/version.rb +0 -17
- data/ios_tests/lib/ios/specs/common/web_context.rb +0 -15
- data/ios_tests/lib/ios/specs/device/device.rb +0 -130
- data/ios_tests/lib/ios/specs/device/multi_touch.rb +0 -31
- data/ios_tests/lib/ios/specs/device/touch_actions.rb +0 -90
- data/ios_tests/lib/ios/specs/driver.rb +0 -308
- data/ios_tests/lib/ios/specs/ios/element/alert.rb +0 -51
- data/ios_tests/lib/ios/specs/ios/element/button.rb +0 -58
- data/ios_tests/lib/ios/specs/ios/element/generic.rb +0 -37
- data/ios_tests/lib/ios/specs/ios/element/text.rb +0 -63
- data/ios_tests/lib/ios/specs/ios/element/textfield.rb +0 -135
- data/ios_tests/lib/ios/specs/ios/helper.rb +0 -59
- data/ios_tests/lib/ios/specs/ios/mobile_methods.rb +0 -20
- data/ios_tests/lib/ios/specs/ios/patch.rb +0 -34
- data/ios_tests/lib/ios/specs/ios/xcuitest_gestures.rb +0 -110
- data/ios_tests/lib/run.rb +0 -4
- data/ios_tests/readme.md +0 -31
- data/ios_tests/upload/sauce_storage.rb +0 -67
- data/ios_tests/upload/upload.rb +0 -6
@@ -1,110 +0,0 @@
|
|
1
|
-
# rake ios[ios/xcuitest_gestures]
|
2
|
-
describe 'ios/xcuitest_gestures' do
|
3
|
-
def before_first
|
4
|
-
screen.must_equal catalog
|
5
|
-
end
|
6
|
-
|
7
|
-
def after_last
|
8
|
-
screen.must_equal catalog
|
9
|
-
end
|
10
|
-
|
11
|
-
def open_alert_ok_cancel
|
12
|
-
wait_true do
|
13
|
-
find_element(:name, 'Show OK-Cancel').click
|
14
|
-
find_element(:name, 'UIActionSheet <title>').displayed?
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
def open_alert_custom
|
19
|
-
wait_true do
|
20
|
-
find_element(:name, 'Show Customized').click
|
21
|
-
find_element(:name, 'UIActionSheet <title>').displayed?
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
t 'before_first' do
|
26
|
-
before_first
|
27
|
-
end
|
28
|
-
|
29
|
-
t 'tap' do
|
30
|
-
element = text('controls')
|
31
|
-
tap(x: 0, y: 0, element: element)
|
32
|
-
end
|
33
|
-
|
34
|
-
t 'double_tap' do
|
35
|
-
element = button('Tinted')
|
36
|
-
double_tap(element: element)
|
37
|
-
end
|
38
|
-
|
39
|
-
t 'touch_and_hold' do
|
40
|
-
element = button('Tinted')
|
41
|
-
touch_and_hold(element: element, duration: 4.0)
|
42
|
-
touch_and_hold(x: 100, y: 100)
|
43
|
-
end
|
44
|
-
|
45
|
-
t 'scroll' do
|
46
|
-
scroll direction: 'down'
|
47
|
-
text('Style Default').displayed?.must_equal true
|
48
|
-
end
|
49
|
-
|
50
|
-
t 'swipe' do
|
51
|
-
swipe direction: 'down'
|
52
|
-
swipe direction: 'down'
|
53
|
-
|
54
|
-
proc { text('Style Default') }.must_raise ::Selenium::WebDriver::Error::NoSuchElementError
|
55
|
-
end
|
56
|
-
|
57
|
-
t 'drag_from_to_for_duration' do
|
58
|
-
drag_from_to_for_duration from_x: 100, from_y: 100, to_x: 100, to_y: 400
|
59
|
-
text('Standard Switch').displayed?.must_equal true
|
60
|
-
end
|
61
|
-
|
62
|
-
t 'pinch' do
|
63
|
-
pinch(scale: 0.5, velocity: -1)
|
64
|
-
end
|
65
|
-
|
66
|
-
t 'back to top' do
|
67
|
-
back_click
|
68
|
-
end
|
69
|
-
|
70
|
-
t 'select_picker_wheel' do
|
71
|
-
element = text('pickers')
|
72
|
-
tap(x: 0, y: 0, element: element)
|
73
|
-
|
74
|
-
e = find_element :name, 'John Appleseed'
|
75
|
-
select_picker_wheel(element: e, order: 'next')
|
76
|
-
|
77
|
-
e.displayed?.must_be false
|
78
|
-
find_element(:name, 'Serena Auroux').displayed?.must_equal true
|
79
|
-
end
|
80
|
-
|
81
|
-
t 'back to top' do
|
82
|
-
back_click
|
83
|
-
end
|
84
|
-
|
85
|
-
t 'alert' do
|
86
|
-
wait_true do
|
87
|
-
UI::Inventory.xcuitest? ? find_element(:name, 'Alerts').click : text('alerts').click
|
88
|
-
tag(UI::Inventory.navbar).name == 'Alerts' # wait for true
|
89
|
-
end
|
90
|
-
|
91
|
-
open_alert_ok_cancel
|
92
|
-
alert action: 'accept'
|
93
|
-
|
94
|
-
open_alert_ok_cancel
|
95
|
-
alert action: 'dismiss'
|
96
|
-
|
97
|
-
open_alert_custom
|
98
|
-
list = alert action: 'getButtons'
|
99
|
-
list.must_equal %w(Button1 Button2)
|
100
|
-
alert action: 'accept', button_label: 'Button1'
|
101
|
-
end
|
102
|
-
|
103
|
-
t 'back to top' do
|
104
|
-
back_click
|
105
|
-
end
|
106
|
-
|
107
|
-
t 'after_last' do
|
108
|
-
after_last
|
109
|
-
end
|
110
|
-
end
|
data/ios_tests/lib/run.rb
DELETED
data/ios_tests/readme.md
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
ruby_lib_ios
|
2
|
-
=====================
|
3
|
-
|
4
|
-
ruby_lib's iOS tests. Requires `Ruby 2.2+` or better.
|
5
|
-
|
6
|
-
- `rake install` Install gems required to run the tests.
|
7
|
-
- `rake ios` Run all tests.
|
8
|
-
- `rake` Run all the test. Same as `rake ios`
|
9
|
-
- `rake ios['ios/element/generic']` Run a single test.
|
10
|
-
- `arc` Opens the Appium Ruby Console (arc). Enables interactive testing.
|
11
|
-
- `gem install appium_console` if it's not installed already.
|
12
|
-
|
13
|
-
`UICatalog6.1` is from [appium/appium](https://github.com/appium/appium/blob/master/assets/UICatalog6.1.app.zip)
|
14
|
-
|
15
|
-
There are two backend drivers available for iOS (automationName). UIAutomation which is supported up-to iOS 9.3 and XCUITest which is supported from 10.0 on. UIAutomation is deprecated but will continue to be supported for the time being.
|
16
|
-
|
17
|
-
By default, the tests are now run against `iPhone 6 Simulator 10.1 (14A345)`
|
18
|
-
#### Documentation
|
19
|
-
|
20
|
-
- [Installing Appium on OS X](https://github.com/appium/ruby_console/blob/master/osx.md)
|
21
|
-
- [Overview](https://github.com/appium/ruby_lib/blob/master/docs/docs.md)
|
22
|
-
- [iOS methods](https://github.com/appium/ruby_lib/blob/master/docs/ios_docs.md)
|
23
|
-
- [Minitest Expectations](http://ruby-doc.org/stdlib-1.9.3/libdoc/minitest/spec/rdoc/MiniTest/Expectations.html)
|
24
|
-
|
25
|
-
--
|
26
|
-
|
27
|
-
```java
|
28
|
-
Finished in 1 min 57 secs
|
29
|
-
|
30
|
-
123 runs, 164 assertions, 0 failures, 0 errors, 0 skips
|
31
|
-
```
|
@@ -1,67 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
See docs @ http://saucelabs.com/docs/rest#storage
|
3
|
-
|
4
|
-
s = SauceStorage.new username: 'my_user_name', key: '00', debug: true
|
5
|
-
|
6
|
-
# or if you have SAUCE_USERNAME and SAUCE_ACCESS_KEY in env already
|
7
|
-
|
8
|
-
s = SauceStorage.new debug: true
|
9
|
-
|
10
|
-
# list all files
|
11
|
-
s.files
|
12
|
-
|
13
|
-
# upload a file
|
14
|
-
s.upload '/tmp/sauce/test.zip'
|
15
|
-
|
16
|
-
> s.files
|
17
|
-
=> [{"size"=>8,
|
18
|
-
"mtime"=>1367700857.1011374,
|
19
|
-
"name"=>"test.zip",
|
20
|
-
"md5"=>"d8064dccc0b399d37c73ffa9661a79b6"}]
|
21
|
-
> s.upload '/tmp/sauce/test.zip'
|
22
|
-
Uploaded /tmp/sauce/test.zip
|
23
|
-
local_md5: 764efa883dda1e11db47671c4a3bbd9e
|
24
|
-
remote_md5: 764efa883dda1e11db47671c4a3bbd9e
|
25
|
-
=end
|
26
|
-
require 'rubygems'
|
27
|
-
require 'restclient'
|
28
|
-
require 'json'
|
29
|
-
|
30
|
-
class SauceStorage
|
31
|
-
attr_reader :username, :key, :url, :debug
|
32
|
-
|
33
|
-
def initialize(opts)
|
34
|
-
@username = opts.fetch :username, ENV['SAUCE_USERNAME']
|
35
|
-
@key = opts.fetch :key, ENV['SAUCE_ACCESS_KEY']
|
36
|
-
@url = "https://#{@username}:#{@key}@saucelabs.com/rest/v1/storage/#{@username}"
|
37
|
-
@debug = opts.fetch :debug, false
|
38
|
-
end
|
39
|
-
|
40
|
-
def upload(file_path)
|
41
|
-
file_name = File.basename file_path
|
42
|
-
file = File.new file_path
|
43
|
-
local_md_5 = Digest::MD5.hexdigest File.read file_path
|
44
|
-
|
45
|
-
files.each do |f|
|
46
|
-
if f['md5'] == local_md5
|
47
|
-
puts 'File already uploaded' if @debug
|
48
|
-
return true
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
url = "#{@url}/#{file_name}?overwrite=plz"
|
53
|
-
json = RestClient.post(url, file, content_type: 'application/octet-stream')
|
54
|
-
remote_md_5 = JSON.parse(json)['md5']
|
55
|
-
if @debug
|
56
|
-
puts "Uploaded #{file_path}"
|
57
|
-
puts " local_md5: #{local_md_5}"
|
58
|
-
puts "remote_md5: #{remote_md_5}"
|
59
|
-
end
|
60
|
-
local_md_5 == remote_md_5
|
61
|
-
end
|
62
|
-
|
63
|
-
def files
|
64
|
-
get = RestClient.get @url
|
65
|
-
JSON.parse(get)['files']
|
66
|
-
end
|
67
|
-
end
|