docs: Add documentation for mobile: source endpoint (#14401)

This commit is contained in:
Mykola Mokhnach
2020-06-02 07:31:53 +02:00
committed by GitHub
parent 83cf58155c
commit 62cd44e83a
+1
View File
@@ -53,6 +53,7 @@
| mobile:isBiometricEnrolled | Check if an iOS Simulator is enrolled or not. Returns `true` if enrolled, `false` if not enrolled. |||
| mobile:clearKeychains | Clear the keychains for an iOS Simulator |||
| mobile:siriCommand| Sends a command to Siri | `{text}` | `{text: "What time is it?"}` |
| mobile:source | This endpoint allows to retrieve the current native page source from WDA as a string (also being in a web context). Possible output formats are: `xml` (same output as for `getPageSource` command, the default value), `json` (the same tree structure as for the `xml` format, but represented as JSON) and `description` (native `debugDescription` output generated by XCTest). An optional `excludedAttributes` array allows to provide attributes names, which are going to be excluded from the resulting xml tree. This might significantly improve the performance of page source retrieval, especially if the `visible` attribute gets excluded. | `{format, excludedAttributes}` | `{format: 'description'}` `{format: 'xml', excludedAttributes: ['visible']}` |
| mobile:activeAppInfo | Gets current active application's information such as bundleId and process arguments | <none> | <none> |
| mobile:deviceInfo | Gets device information like locale and timezone. The timezone is TZ database format like `America/New_York` by default, fallback to Apple name like `US/New_York` | <none> | <none> |
| mobile:rotateElement | Sends a rotation gesture with two touches to the given element. See [rotate:withVelocity:](https://developer.apple.com/documentation/xctest/xcuielement/1618665-rotate) for more details. | `{element, rotation, velocity}` | `{element: 2, rotation: π/2, velocity: 1.5}` |