appium_lib 9.4.5 → 9.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/appium_lib.gemspec +1 -1
  4. data/docs/android_docs.md +224 -224
  5. data/docs/ios_docs.md +250 -250
  6. data/lib/appium_lib/common/version.rb +1 -1
  7. data/release_notes.md +13 -0
  8. metadata +1 -109
  9. data/android_tests/Gemfile +0 -2
  10. data/android_tests/LICENSE-2.0.txt +0 -202
  11. data/android_tests/Rakefile +0 -68
  12. data/android_tests/api.apk +0 -0
  13. data/android_tests/appium.txt +0 -11
  14. data/android_tests/flaky.txt +0 -1
  15. data/android_tests/lib/android/specs/android/element/alert.rb +0 -48
  16. data/android_tests/lib/android/specs/android/element/button.rb +0 -52
  17. data/android_tests/lib/android/specs/android/element/generic.rb +0 -58
  18. data/android_tests/lib/android/specs/android/element/text.rb +0 -35
  19. data/android_tests/lib/android/specs/android/element/textfield.rb +0 -62
  20. data/android_tests/lib/android/specs/android/helper.rb +0 -111
  21. data/android_tests/lib/android/specs/android/patch.rb +0 -27
  22. data/android_tests/lib/android/specs/common/command.rb +0 -52
  23. data/android_tests/lib/android/specs/common/device.rb +0 -159
  24. data/android_tests/lib/android/specs/common/device_touchaction.rb +0 -34
  25. data/android_tests/lib/android/specs/common/element/window.rb +0 -11
  26. data/android_tests/lib/android/specs/common/helper.rb +0 -112
  27. data/android_tests/lib/android/specs/common/patch.rb +0 -78
  28. data/android_tests/lib/android/specs/common/version.rb +0 -9
  29. data/android_tests/lib/android/specs/common/web_context.rb +0 -60
  30. data/android_tests/lib/android/specs/device/touch_actions.rb +0 -71
  31. data/android_tests/lib/android/specs/driver.rb +0 -280
  32. data/android_tests/lib/android/specs/install.rb +0 -26
  33. data/android_tests/lib/format.rb +0 -47
  34. data/android_tests/lib/run.rb +0 -91
  35. data/android_tests/readme.md +0 -30
  36. data/grid/README.md +0 -21
  37. data/grid/appium.txt.ios.example +0 -15
  38. data/grid/config.json +0 -25
  39. data/grid/hub_config.json +0 -14
  40. data/grid/selenium-server-standalone-2.53.1.jar +0 -0
  41. data/grid/selenium-server-standalone-3.2.0.jar +0 -0
  42. data/ios_tests/Gemfile +0 -4
  43. data/ios_tests/LICENSE-2.0.txt +0 -202
  44. data/ios_tests/Rakefile +0 -54
  45. data/ios_tests/UICatalog.app.zip +0 -0
  46. data/ios_tests/UICatalog.app/12-6AM.png +0 -0
  47. data/ios_tests/UICatalog.app/12-6PM.png +0 -0
  48. data/ios_tests/UICatalog.app/6-12AM.png +0 -0
  49. data/ios_tests/UICatalog.app/6-12PM.png +0 -0
  50. data/ios_tests/UICatalog.app/Default-568h@2x.png +0 -0
  51. data/ios_tests/UICatalog.app/Default@2x.png +0 -0
  52. data/ios_tests/UICatalog.app/Info.plist +0 -0
  53. data/ios_tests/UICatalog.app/PkgInfo +0 -1
  54. data/ios_tests/UICatalog.app/UIButton_custom.png +0 -0
  55. data/ios_tests/UICatalog.app/UICatalog +0 -0
  56. data/ios_tests/UICatalog.app/blueButton.png +0 -0
  57. data/ios_tests/UICatalog.app/bookmarkImage.png +0 -0
  58. data/ios_tests/UICatalog.app/bookmarkImageHighlighted.png +0 -0
  59. data/ios_tests/UICatalog.app/divider.png +0 -0
  60. data/ios_tests/UICatalog.app/en.lproj/AlertsViewController.nib +0 -0
  61. data/ios_tests/UICatalog.app/en.lproj/ButtonsViewController.nib +0 -0
  62. data/ios_tests/UICatalog.app/en.lproj/ControlsViewController.nib +0 -0
  63. data/ios_tests/UICatalog.app/en.lproj/ImagesViewController.nib +0 -0
  64. data/ios_tests/UICatalog.app/en.lproj/Localizable.strings +0 -0
  65. data/ios_tests/UICatalog.app/en.lproj/MainWindow.nib +0 -0
  66. data/ios_tests/UICatalog.app/en.lproj/PickerViewController.nib +0 -0
  67. data/ios_tests/UICatalog.app/en.lproj/SearchBarController.nib +0 -0
  68. data/ios_tests/UICatalog.app/en.lproj/SegmentViewController.nib +0 -0
  69. data/ios_tests/UICatalog.app/en.lproj/TextFieldController.nib +0 -0
  70. data/ios_tests/UICatalog.app/en.lproj/TextViewController.nib +0 -0
  71. data/ios_tests/UICatalog.app/en.lproj/ToolbarViewController.nib +0 -0
  72. data/ios_tests/UICatalog.app/en.lproj/TransitionViewController.nib +0 -0
  73. data/ios_tests/UICatalog.app/en.lproj/WebViewController.nib +0 -0
  74. data/ios_tests/UICatalog.app/orangeslide.png +0 -0
  75. data/ios_tests/UICatalog.app/scene1.jpg +0 -0
  76. data/ios_tests/UICatalog.app/scene2.jpg +0 -0
  77. data/ios_tests/UICatalog.app/scene3.jpg +0 -0
  78. data/ios_tests/UICatalog.app/scene4.jpg +0 -0
  79. data/ios_tests/UICatalog.app/scene5.jpg +0 -0
  80. data/ios_tests/UICatalog.app/searchBarBackground.png +0 -0
  81. data/ios_tests/UICatalog.app/segment_check.png +0 -0
  82. data/ios_tests/UICatalog.app/segment_search.png +0 -0
  83. data/ios_tests/UICatalog.app/segment_tools.png +0 -0
  84. data/ios_tests/UICatalog.app/segmentedBackground.png +0 -0
  85. data/ios_tests/UICatalog.app/slider_ball.png +0 -0
  86. data/ios_tests/UICatalog.app/toolbarBackground.png +0 -0
  87. data/ios_tests/UICatalog.app/whiteButton.png +0 -0
  88. data/ios_tests/UICatalog.app/yellowslide.png +0 -0
  89. data/ios_tests/appium.txt +0 -15
  90. data/ios_tests/data/unicode.txt +0 -1
  91. data/ios_tests/flaky.txt +0 -1
  92. data/ios_tests/lib/common.rb +0 -84
  93. data/ios_tests/lib/format.rb +0 -23
  94. data/ios_tests/lib/ios/specs/common/command.rb +0 -45
  95. data/ios_tests/lib/ios/specs/common/element/window.rb +0 -17
  96. data/ios_tests/lib/ios/specs/common/helper.rb +0 -228
  97. data/ios_tests/lib/ios/specs/common/patch.rb +0 -54
  98. data/ios_tests/lib/ios/specs/common/version.rb +0 -17
  99. data/ios_tests/lib/ios/specs/common/web_context.rb +0 -15
  100. data/ios_tests/lib/ios/specs/device/device.rb +0 -130
  101. data/ios_tests/lib/ios/specs/device/multi_touch.rb +0 -31
  102. data/ios_tests/lib/ios/specs/device/touch_actions.rb +0 -90
  103. data/ios_tests/lib/ios/specs/driver.rb +0 -308
  104. data/ios_tests/lib/ios/specs/ios/element/alert.rb +0 -51
  105. data/ios_tests/lib/ios/specs/ios/element/button.rb +0 -58
  106. data/ios_tests/lib/ios/specs/ios/element/generic.rb +0 -37
  107. data/ios_tests/lib/ios/specs/ios/element/text.rb +0 -63
  108. data/ios_tests/lib/ios/specs/ios/element/textfield.rb +0 -135
  109. data/ios_tests/lib/ios/specs/ios/helper.rb +0 -59
  110. data/ios_tests/lib/ios/specs/ios/mobile_methods.rb +0 -20
  111. data/ios_tests/lib/ios/specs/ios/patch.rb +0 -34
  112. data/ios_tests/lib/ios/specs/ios/xcuitest_gestures.rb +0 -110
  113. data/ios_tests/lib/run.rb +0 -4
  114. data/ios_tests/readme.md +0 -31
  115. data/ios_tests/upload/sauce_storage.rb +0 -67
  116. 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
@@ -1,4 +0,0 @@
1
- # ios tests have a set of common helper methods
2
- require_relative 'common'
3
- # run file is identical to android
4
- require_relative '../../android_tests/lib/run'
@@ -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
@@ -1,6 +0,0 @@
1
- require File.expand_path '../sauce_storage', __FILE__
2
-
3
- s = SauceStorage.new debug: true
4
- apk = File.expand_path '../' * 2 + ENV['UPLOAD_FILE'], __FILE__
5
-
6
- s.upload apk