appium_lib 16.3.1 → 16.3.2

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.
data/docs/ios_xcuitest.md DELETED
@@ -1,114 +0,0 @@
1
- ## XCUITest
2
- - Over Appium1.6.0 provides `XCUITest` automation name based on WebDriverAgent.
3
- - [appium-xcuitest-driver](https://github.com/appium/appium-xcuitest-driver)
4
- - [WebDriverAgent](https://github.com/facebook/WebDriverAgent)
5
- - How to migrate XCUITest from UIAutomation
6
- - [Migrating your iOS tests from UIAutomation](https://github.com/appium/appium/blob/v1.6.2/docs/en/advanced-concepts/migrating-to-xcuitest.md)
7
- - Mobile gestures for XCUITest
8
- - [ios-xctest-mobile-gestures](https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/ios/ios-xctest-mobile-gestures.md)
9
- - Required Appium1.6.4+
10
-
11
- ## find elements
12
- - supported elements by find_element are:
13
- - [appium-xcuitest-driver](https://github.com/appium/appium-xcuitest-driver/blob/master/lib/commands/find.js#L17)
14
- - [locatorStrategies](https://github.com/appium/appium-xcuitest-driver/blob/95886f1118d71fe950768f8262179d3608b40fc7/lib/driver.js#L81)
15
- - [WebDriverAgent](https://github.com/facebook/WebDriverAgent/blob/8346199212bffceab24192e81bc0118d65132466/WebDriverAgentLib/Commands/FBFindElementCommands.m#L111)
16
- - Mapping
17
- - https://github.com/facebook/WebDriverAgent/blob/master/WebDriverAgentLib/Utilities/FBElementTypeTransformer.m#L19
18
-
19
- ### with except for XPath and Predicate
20
- #### examples
21
- - [button_class](https://github.com/appium/ruby_lib/blob/master/lib/appium_lib/ios/element/button.rb#L8), [static_text_class](https://github.com/appium/ruby_lib/blob/master/lib/appium_lib/ios/element/text.rb#L8), [text_field_class](https://github.com/appium/ruby_lib/blob/master/lib/appium_lib/ios/element/textfield.rb#L10) and [secure_text_field_class](https://github.com/appium/ruby_lib/blob/master/lib/appium_lib/ios/element/textfield.rb#L15) provide class name.
22
- - If `automationName` is `Appium` or `nil`, then they provide `UIAxxxx`
23
- - If `automationName` is `XCUITest`, then they provide `XCUIElementTypexxx`
24
-
25
- ```ruby
26
- find_element(:class, button_class) # Return a element of XCUIElementTypeButton for XCUITest
27
- ```
28
-
29
- - [tag/s](https://github.com/appium/ruby_lib/blob/ac03116756a72fbd624fa32ea886123b955d7089/lib/appium_lib/android/helper.rb#L238) is alias of `find_element :class, element`
30
-
31
- - `accessibility_id`
32
-
33
- ```ruby
34
- find_element(:accessibility_id, element) # Return a element which has accessibilityIdentifier, `element`.
35
- ```
36
-
37
- - `button/s(value)`, `button_exact/buttons_exact`, `text/s(value)`, `text_exact/texts_exact`
38
- ```ruby
39
- buttons(value) # Return button elements include `value` as its name attributes.
40
- ```
41
-
42
- ### with Predicate
43
- - We recommend to use predicate strategy instead of XPath strategy.
44
- - e.g. `find_ele_by_predicate/find_eles_by_predicate`, `find_ele_by_predicate_include/find_eles_by_predicate_include`
45
- - A helpful cheatsheet for predicate
46
- - https://realm.io/news/nspredicate-cheatsheet/
47
- - For XCUITest(WebDriverAgent), without 'wd' prefixes are supported.
48
- - https://github.com/facebook/WebDriverAgent/wiki/Queries
49
- - For example, `%(name ==[c] "#{value}" || label ==[c] "#{value}" || value ==[c] "#{value}")` is equal to `%(wdName ==[c] "#{value}" || wdLabel ==[c] "#{value}" || wdValue ==[c] "#{value}")` in WebDriverAgent.
50
-
51
- #### examples
52
- - `textfield/s(value)`, `find/s`, `find_exact/finds_exact`, `find_ele_by_predicate/find_eles_by_predicate` and `find_ele_by_predicate_include/find_eles_by_predicate_include` use predicate strategy in their method.
53
-
54
- ```ruby
55
- textfield(value) # Return a XCUIElementTypeSecureTextField or XCUIElementTypeTextField element which has `value` text.
56
- finds_exact(value) # Return any elements include `value` as its name attributes.
57
- ```
58
-
59
- ### with Class Chain
60
- - require Appium 1.6.4+
61
- - https://github.com/appium/appium-xcuitest-driver/pull/391
62
- - https://github.com/appium/java-client/pull/599/files
63
- - WebDriverAgent
64
- - https://github.com/facebook/WebDriverAgent/wiki/Queries
65
-
66
- ### with XPath
67
- - It is better to avoid XPath strategy.
68
- - https://github.com/appium/appium/blob/v1.6.2/docs/en/advanced-concepts/migrating-to-xcuitest.md#xpath-locator-strategy
69
- - > Try not to use XPath locators unless there are absolutely no other alternatives. In general, XPath locators might be times slower, than other types of locators like accessibility id, class name and predicate (up to 100 times slower in some special cases). They are so slow because XPath location is not natively supported by Apple's XCTest framework.
70
- - Improved performance a bit
71
- - https://github.com/appium/appium/issues/6842
72
- - https://github.com/facebook/WebDriverAgent/issues/306
73
- - XPath in WebDriverAgent
74
- - https://github.com/facebook/WebDriverAgent/blob/2158a8d0f305549532f1338fe1e4628cfbd53cd9/WebDriverAgentLib/Categories/XCElementSnapshot%2BFBHelpers.m#L57
75
-
76
- #### examples
77
-
78
- ```ruby
79
- xpaths("//some xpaths")
80
- ```
81
-
82
- ## Gesture
83
- - `mobile:` commands are provided by WDA.
84
- - Documentations
85
- - https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/ios/ios-xctest-mobile-gestures.md
86
- - Specs by test code
87
- - https://github.com/appium/appium-xcuitest-driver/blob/master/test/functional/basic/gesture-e2e-specs.js
88
-
89
- ### Workaround
90
- - `mobile:` commands depends on WDA and Apple's framework and the behaviour depends on them.
91
- - Sometimes issues occur such as "doubleTap isn't tapping #548"
92
- - workaround for it:
93
- - with `selenium-webdriver >= 3.4.0`
94
- ```ruby
95
- def double_tap(element)
96
- rect = element.rect
97
- execute_script 'mobile: doubleTap', x: rect.x + rect.width / 2, y: rect.y + rect.height / 2
98
- end
99
- ```
100
- - with `selenium-webdriver < 3.4.0`
101
- ```ruby
102
- def double_tap(element)
103
- size = element.size
104
- location = element.location
105
- execute_script 'mobile: doubleTap', x: location.x + size.width / 2, y: location.y + size.height / 2
106
- end
107
- ```
108
-
109
- ## Other actions
110
- Basically, other actions such as `type` are compatible with `automationName = Appium`.
111
-
112
- ## Pasteboard
113
- - Simulator only
114
- - https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/ios-xctest-pasteboard.md
data/docs/parallel.md DELETED
@@ -1,8 +0,0 @@
1
- Appium 1.7.0+ supports single server and multiple sessions, and it requires Xcode 9 for iOS.
2
-
3
- # Example
4
- ## Run tests on Multiple Simulators with Xcode 9
5
- - https://github.com/appium/appium-xcuitest-driver/tree/master/test/functional/parallel
6
- - https://github.com/appium/ruby_lib/tree/master/ios_tests/parallel
7
- - Thread programming: TestParallelRunThread
8
- - Process programming: TestParallelRunProcess
data/docs/w3c.md DELETED
@@ -1,55 +0,0 @@
1
- Perform touch actions for W3C module. Generate `touch` pointer action here and users can use this via `driver.action`
2
-
3
- [Documentation](http://www.rubydoc.info/github/appium/ruby_lib_core/Appium%2FCore%2FBase%2FCoreBridgeW3C:action)
4
-
5
- # Example
6
-
7
- ```ruby
8
- dialect #=> :w3c
9
-
10
- # then
11
- el = find_element(:name, 'Pickers')
12
- driver.action.click(el).perform #=> work
13
-
14
-
15
- # Scroll/Swipe
16
- driver.action
17
- .move_to_location(500, 500).pointer_down(:left)
18
- .move_to_location(0, 700)
19
- .release.perform
20
-
21
-
22
- # Zoom in
23
- # multiple action chains
24
- f1 = driver.action.add_pointer_input(:touch, 'finger1')
25
- f1.create_pointer_move(duration: 1, x: 200, y: 500,
26
- origin: ::Selenium::WebDriver::Interactions::PointerMove::VIEWPORT)
27
- f1.create_pointer_down(:left)
28
- f1.create_pause(0.5)
29
- f1.create_pointer_move(duration: 1, x: 200, y: 200,
30
- origin: ::Selenium::WebDriver::Interactions::PointerMove::VIEWPORT)
31
- f1.create_pointer_up(:left)
32
-
33
- f2 = driver.action.add_pointer_input(:touch, 'finger2')
34
- f2.create_pointer_move(duration: 1, x: 200, y: 500,
35
- origin: ::Selenium::WebDriver::Interactions::PointerMove::VIEWPORT)
36
- f2.create_pointer_down(:left)
37
- f2.create_pause(0.5)
38
- f2.create_pointer_move(duration: 1, x: 200, y: 800,
39
- origin: ::Selenium::WebDriver::Interactions::PointerMove::VIEWPORT)
40
- f2.create_pointer_up(:left)
41
-
42
- driver.perform_actions [f1, f2]
43
- ```
44
-
45
- # Note
46
- ## Coordinate points
47
- - jsonwp
48
- - Relative action coordinates are counted relatively to the **top left point** of element's rectangle
49
- - W3C
50
- - Relative action coordinates are counted relatively to the **center** of element's rectangle
51
-
52
- ## Limitations
53
- - WebDriverAgent support only `touch` as a `pointer type`.
54
- - By default, [ruby_lib_core](https://github.com/appium/ruby_lib_core/blob/ab5d7c5ed31f318a9395e5aeafe1d0d655d3cff4/lib/appium_lib_core/common/base/w3c_bridge.rb#L26) generate `touch` based actions.
55
- - About `pointer type` => [W3C](https://www.w3.org/TR/webdriver/#perform-actions) and [Simple WD Spec](https://github.com/jlipps/simple-wd-spec#perform-actions)