mirror of
https://github.com/appium/appium.git
synced 2026-01-24 11:18:55 -06:00
Completed JSONWP commands (#9356)
This commit is contained in:
77
commands-yml/commands/element/attributes/page-index.yml
Normal file
77
commands-yml/commands/element/attributes/page-index.yml
Normal file
@@ -0,0 +1,77 @@
|
||||
---
|
||||
name: Get Tag Name
|
||||
short_description: Get an element's tag name
|
||||
|
||||
example_usage:
|
||||
java:
|
||||
|
|
||||
MobileElement element = (MobileElement) driver.findElementByAccessibilityId("SomeAccessibilityID");
|
||||
String tagName = element.getTagName();
|
||||
python:
|
||||
|
|
||||
tagName = self.driver.find_element_by_accessibility_id('SomeAccessibilityID').tag_name
|
||||
javascript_wd:
|
||||
|
|
||||
let element = await driver.elementByAccessibilityId("SomeAccessibilityID");
|
||||
let tagName = await element.getTagName();
|
||||
javascript_wdio:
|
||||
|
|
||||
let tagName = driver.getTagName("~SomeAccessibilityId");
|
||||
ruby:
|
||||
|
|
||||
@driver.find_element(:accessibility_id, 'SomeAccessibilityID').tag_name
|
||||
php:
|
||||
|
|
||||
// TODO PHP sample
|
||||
csharp:
|
||||
|
|
||||
// TODO C# sample
|
||||
|
||||
client_docs:
|
||||
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebElement.html#getTagName--"
|
||||
python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webelement.WebElement.tag_name"
|
||||
javascript_wdio: "http://webdriver.io/api/property/getTagName.html"
|
||||
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1336"
|
||||
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Element#tag_name-instance_method"
|
||||
php: "https://github.com/appium/php-client/" # TODO PHP documentation link
|
||||
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link
|
||||
|
||||
# TODO: Confirm if all the drivers support this
|
||||
driver_support:
|
||||
ios:
|
||||
xcuitest: true
|
||||
uiautomation: true
|
||||
android:
|
||||
uiautomator2: true
|
||||
uiautomator: true
|
||||
mac:
|
||||
mac: true
|
||||
windows:
|
||||
windows: true
|
||||
client_support:
|
||||
java: true
|
||||
python: true
|
||||
ruby: true
|
||||
php: true
|
||||
csharp: true
|
||||
javascript_wd: true
|
||||
javascript_wdio: true
|
||||
|
||||
|
||||
# Information about the HTTP endpoints
|
||||
endpoint:
|
||||
url: /wd/hub/session/:session_id/elements/:element_id/name
|
||||
method: 'GET'
|
||||
url_parameters:
|
||||
- name: session_id
|
||||
description: ID of the session to route the command to
|
||||
- name: element_id
|
||||
description: ID of the element to get the name from
|
||||
response:
|
||||
- type: string
|
||||
description: The tag name of the element
|
||||
|
||||
# Links to specifications. Should link to at least one specification
|
||||
specifications:
|
||||
w3c: https://www.w3.org/TR/webdriver/#dfn-get-element-tag-name
|
||||
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidname
|
||||
80
commands-yml/commands/session/other/get-geolocation.yml
Normal file
80
commands-yml/commands/session/other/get-geolocation.yml
Normal file
@@ -0,0 +1,80 @@
|
||||
---
|
||||
name: Get Geolocation
|
||||
short_description: Get the current geo location
|
||||
|
||||
example_usage:
|
||||
java:
|
||||
|
|
||||
Location location = driver.location(); // Must be a driver that implements LocationContext
|
||||
python:
|
||||
|
|
||||
location = self.driver.location()
|
||||
javascript_wd:
|
||||
|
|
||||
let location = await driver.sessionCapabilities('c8db88a0-47a6-47a1-802d-164d746c06aa');
|
||||
|
||||
javascript_wdio:
|
||||
|
|
||||
let location = driver.location();
|
||||
ruby:
|
||||
|
|
||||
@driver.location()
|
||||
php:
|
||||
|
|
||||
// TODO PHP sample
|
||||
csharp:
|
||||
|
|
||||
// TODO C# sample
|
||||
|
||||
client_docs:
|
||||
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/html5/LocationContext.html#location--"
|
||||
python: "http://selenium-python.readthedocs.io/api.html"
|
||||
javascript_wdio: "http://webdriver.io/api/protocol/location.html"
|
||||
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L393"
|
||||
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/DriverExtensions/HasLocation#set_location-instance_method"
|
||||
php: "https://github.com/appium/php-client/" # TODO PHP documentation link
|
||||
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link
|
||||
|
||||
# Driver support by platform
|
||||
driver_support:
|
||||
ios:
|
||||
xcuitest: true
|
||||
uiautomation: true
|
||||
android:
|
||||
uiautomator2: true
|
||||
uiautomator: true
|
||||
mac:
|
||||
mac: true
|
||||
windows:
|
||||
windows: true
|
||||
client_support:
|
||||
java: true
|
||||
python: true
|
||||
ruby: true
|
||||
php: true
|
||||
csharp: true
|
||||
javascript_wd: true
|
||||
javascript_wdio: true
|
||||
|
||||
|
||||
# Information about the HTTP endpoints
|
||||
endpoint:
|
||||
url: /session/:session_id/location
|
||||
method: GET
|
||||
url_parameters:
|
||||
- name: session_id
|
||||
description: ID of the session to route the command to
|
||||
response:
|
||||
- name: latitude
|
||||
type: number
|
||||
description: The current geolocation latitude
|
||||
- name: longitude
|
||||
type: number
|
||||
description: The current geolocation longitude
|
||||
- name: altitude
|
||||
type: number
|
||||
description: The current geolocation altitude
|
||||
|
||||
# Links to specifications. Should link to at least one specification
|
||||
specifications:
|
||||
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidlocation
|
||||
73
commands-yml/commands/session/other/get-log-types.yml
Normal file
73
commands-yml/commands/session/other/get-log-types.yml
Normal file
@@ -0,0 +1,73 @@
|
||||
---
|
||||
name: Get available log types
|
||||
short_description: Get the log for a given log type. Log buffer is reset after each request
|
||||
|
||||
example_usage:
|
||||
java:
|
||||
|
|
||||
Set<String> logEntries = driver.manage().logs().getAvailableLogTypes();
|
||||
python:
|
||||
|
|
||||
log_types = driver.log_types();
|
||||
javascript_wd:
|
||||
|
|
||||
const logTypes = await driver.logTypes();
|
||||
|
||||
javascript_wdio:
|
||||
|
|
||||
driver.log()
|
||||
ruby:
|
||||
|
|
||||
log_types = @driver.logTypes
|
||||
php:
|
||||
|
|
||||
// TODO PHP sample
|
||||
csharp:
|
||||
|
|
||||
// TODO C# sample
|
||||
|
||||
client_docs:
|
||||
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/logging/SessionLogs.html#getLogTypes--"
|
||||
python: "http://selenium-python.readthedocs.io/api.html?highlight=get_log#selenium.webdriver.remote.webdriver.WebDriver.log_types"
|
||||
javascript_wdio: "http://webdriver.io/api/protocol/logTypes.html"
|
||||
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L441"
|
||||
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium%2FWebDriver%2FRemote%2FOSS%2FBridge:available_log_types"
|
||||
php: "https://github.com/appium/php-client/" # TODO PHP documentation link
|
||||
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link
|
||||
|
||||
# Driver support by platform
|
||||
driver_support:
|
||||
ios:
|
||||
xcuitest: true
|
||||
uiautomation: true
|
||||
android:
|
||||
uiautomator2: true
|
||||
uiautomator: true
|
||||
mac:
|
||||
mac: true # TODO Confirm this that mouse movements
|
||||
windows:
|
||||
windows: true # TODO Confirm this
|
||||
client_support:
|
||||
java: true
|
||||
python: true
|
||||
ruby: true
|
||||
php: true
|
||||
csharp: true
|
||||
javascript_wd: true
|
||||
javascript_wdio: true
|
||||
|
||||
|
||||
# Information about the HTTP endpoints
|
||||
endpoint:
|
||||
url: /session/:session_id/log/types
|
||||
method: POST
|
||||
url_parameters:
|
||||
- name: session_id
|
||||
description: ID of the session to route the command to
|
||||
response:
|
||||
- type: array<string>
|
||||
description: The list of log types
|
||||
|
||||
# Links to specifications. Should link to at least one specification
|
||||
specifications:
|
||||
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidlogtypes
|
||||
77
commands-yml/commands/session/other/get-log.yml
Normal file
77
commands-yml/commands/session/other/get-log.yml
Normal file
@@ -0,0 +1,77 @@
|
||||
---
|
||||
name: Get Logs
|
||||
short_description: Get the log for a given log type. Log buffer is reset after each request
|
||||
|
||||
example_usage:
|
||||
java:
|
||||
|
|
||||
LogEntries logEntries = driver.manage().logs().get("driver");
|
||||
python:
|
||||
|
|
||||
logs = driver.get_log('driver');
|
||||
javascript_wd:
|
||||
|
|
||||
const logs = await driver.log('driver');
|
||||
|
||||
javascript_wdio:
|
||||
|
|
||||
let logs = driver.log('driver')
|
||||
ruby:
|
||||
|
|
||||
@driver.logs('driver')
|
||||
php:
|
||||
|
|
||||
// TODO PHP sample
|
||||
csharp:
|
||||
|
|
||||
// TODO C# sample
|
||||
|
||||
client_docs:
|
||||
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/logging/SessionLogs.html#getLogTypes--"
|
||||
python: "http://selenium-python.readthedocs.io/api.html?highlight=get_log#selenium.webdriver.remote.webdriver.WebDriver.get_log"
|
||||
javascript_wdio: "http://webdriver.io/api/protocol/log.html"
|
||||
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L455"
|
||||
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium%2FWebDriver%2FTouchActionBuilder:scroll"
|
||||
php: "https://github.com/appium/php-client/" # TODO PHP documentation link
|
||||
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link
|
||||
|
||||
# Driver support by platform
|
||||
driver_support:
|
||||
ios:
|
||||
xcuitest: true
|
||||
uiautomation: true
|
||||
android:
|
||||
uiautomator2: true
|
||||
uiautomator: true
|
||||
mac:
|
||||
mac: true # TODO Confirm this that mouse movements
|
||||
windows:
|
||||
windows: true # TODO Confirm this
|
||||
client_support:
|
||||
java: true
|
||||
python: true
|
||||
ruby: true
|
||||
php: true
|
||||
csharp: true
|
||||
javascript_wd: true
|
||||
javascript_wdio: true
|
||||
|
||||
|
||||
# Information about the HTTP endpoints
|
||||
endpoint:
|
||||
url: /session/:session_id/log
|
||||
method: POST
|
||||
url_parameters:
|
||||
- name: session_id
|
||||
description: ID of the session to route the command to
|
||||
json_parameters:
|
||||
- name: type
|
||||
type: string
|
||||
description: The log type
|
||||
response:
|
||||
- type: array<object>
|
||||
description: The list of log entries
|
||||
|
||||
# Links to specifications. Should link to at least one specification
|
||||
specifications:
|
||||
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidtouchscroll
|
||||
80
commands-yml/commands/session/other/set-geolocation.yml
Normal file
80
commands-yml/commands/session/other/set-geolocation.yml
Normal file
@@ -0,0 +1,80 @@
|
||||
---
|
||||
name: Set Geolocation
|
||||
short_description: Set the current geo location
|
||||
|
||||
example_usage:
|
||||
java:
|
||||
|
|
||||
driver.setLocation(new Location(49, 123, 10)); // Must be a driver that implements LocationContext
|
||||
python:
|
||||
|
|
||||
self.driver.set_location(49, 123, 10)
|
||||
javascript_wd:
|
||||
|
|
||||
let location = await driver.sessionCapabilities('c8db88a0-47a6-47a1-802d-164d746c06aa');
|
||||
|
||||
javascript_wdio:
|
||||
|
|
||||
driver.location({latitude: 121.21, longitude: 11.56, altitude: 94.23});
|
||||
ruby:
|
||||
|
|
||||
@driver.set_location(121.21, 11.56, 94.23)
|
||||
php:
|
||||
|
|
||||
// TODO PHP sample
|
||||
csharp:
|
||||
|
|
||||
// TODO C# sample
|
||||
|
||||
client_docs:
|
||||
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/html5/LocationContext.html#location--"
|
||||
python: "http://selenium-python.readthedocs.io/api.html"
|
||||
javascript_wdio: "http://webdriver.io/api/protocol/location.html"
|
||||
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L407"
|
||||
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium%2FWebDriver%2FDriverExtensions%2FHasLocation:set_location"
|
||||
php: "https://github.com/appium/php-client/" # TODO PHP documentation link
|
||||
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link
|
||||
|
||||
# Driver support by platform
|
||||
driver_support:
|
||||
ios:
|
||||
xcuitest: true
|
||||
uiautomation: true
|
||||
android:
|
||||
uiautomator2: true
|
||||
uiautomator: true
|
||||
mac:
|
||||
mac: true
|
||||
windows:
|
||||
windows: true
|
||||
client_support:
|
||||
java: true
|
||||
python: true
|
||||
ruby: true
|
||||
php: true
|
||||
csharp: true
|
||||
javascript_wd: true
|
||||
javascript_wdio: true
|
||||
|
||||
|
||||
# Information about the HTTP endpoints
|
||||
endpoint:
|
||||
url: /session/:session_id/location
|
||||
method: POST
|
||||
url_parameters:
|
||||
- name: session_id
|
||||
description: ID of the session to route the command to
|
||||
json_parameters:
|
||||
- name: latitude
|
||||
type: number
|
||||
description: The current geolocation latitude
|
||||
- name: longitude
|
||||
type: number
|
||||
description: The current geolocation longitude
|
||||
- name: altitude
|
||||
type: number
|
||||
description: The current geolocation altitude
|
||||
|
||||
# Links to specifications. Should link to at least one specification
|
||||
specifications:
|
||||
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#post-sessionsessionidlocation
|
||||
111
docs/en/commands/session/other/get-geolocation.md
Normal file
111
docs/en/commands/session/other/get-geolocation.md
Normal file
@@ -0,0 +1,111 @@
|
||||
# Get Geolocation
|
||||
|
||||
Get the current geo location
|
||||
## Example Usage
|
||||
|
||||
```java
|
||||
// Java
|
||||
Location location = driver.location(); // Must be a driver that implements LocationContext
|
||||
|
||||
```
|
||||
|
||||
```python
|
||||
# Python
|
||||
location = self.driver.location()
|
||||
|
||||
```
|
||||
|
||||
```javascript
|
||||
// Javascript
|
||||
// webdriver.io example
|
||||
let location = driver.location();
|
||||
|
||||
|
||||
|
||||
// wd example
|
||||
let location = await driver.sessionCapabilities('c8db88a0-47a6-47a1-802d-164d746c06aa');
|
||||
|
||||
```
|
||||
|
||||
```ruby
|
||||
# Ruby
|
||||
@driver.location()
|
||||
|
||||
```
|
||||
|
||||
```php
|
||||
# PHP
|
||||
// TODO PHP sample
|
||||
|
||||
```
|
||||
|
||||
```csharp
|
||||
// C#
|
||||
// TODO C# sample
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Client Docs
|
||||
|
||||
* [Java](https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/html5/LocationContext.html#location--)
|
||||
* [Python](http://selenium-python.readthedocs.io/api.html)
|
||||
* [Javascript (WebdriverIO)](http://webdriver.io/api/protocol/location.html)
|
||||
* [Javascript (WD)](https://github.com/admc/wd/blob/master/lib/commands.js#L393)
|
||||
* [Ruby](http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/DriverExtensions/HasLocation#set_location-instance_method)
|
||||
* [PHP](https://github.com/appium/php-client/)
|
||||
* [C#](https://github.com/appium/appium-dotnet-driver/)
|
||||
|
||||
## Support
|
||||
|
||||
### Appium Server
|
||||
|
||||
|Platform|Driver|Platform Versions|Appium Version|Driver Version|
|
||||
|--------|----------------|------|--------------|--------------|
|
||||
| iOS | [XCUITest](/docs/en/drivers/ios-xcuitest.md) | 9.3+ | 1.6.0+ | All |
|
||||
| | [UIAutomation](/docs/en/drivers/ios-uiautomation.md) | 8.0 to 9.3 | All | All |
|
||||
| Android | [UiAutomator2](/docs/en/drivers/android-uiautomator2.md) | ?+ | 1.6.0+ | All |
|
||||
| | [UiAutomator](/docs/en/drivers/android-uiautomator.md) | 4.2+ | All | All |
|
||||
| Mac | [Mac](/docs/en/drivers/mac.md) | ?+ | 1.6.4+ | All |
|
||||
| Windows | [Windows](/docs/en/drivers/windows.md) | 10+ | 1.6.0+ | All |
|
||||
|
||||
### Appium Clients
|
||||
|
||||
|Language|Support|
|
||||
|--------|-------|
|
||||
|[Java](https://github.com/appium/java-client/releases/latest)| All |
|
||||
|[Python](https://github.com/appium/python-client/releases/latest)| All |
|
||||
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All |
|
||||
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All |
|
||||
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All |
|
||||
|[PHP](https://github.com/appium/php-client/releases/latest)| All |
|
||||
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All |
|
||||
|
||||
## HTTP API Specifications
|
||||
|
||||
### Endpoint
|
||||
|
||||
`GET /session/:session_id/location`
|
||||
|
||||
### URL Parameters
|
||||
|
||||
|name|description|
|
||||
|----|-----------|
|
||||
|session_id|ID of the session to route the command to|
|
||||
|
||||
### JSON Parameters
|
||||
|
||||
None
|
||||
|
||||
### Response
|
||||
|
||||
|name|type|description|
|
||||
|----|----|-----------|
|
||||
| latitude | number | The current geolocation latitude |
|
||||
| longitude | number | The current geolocation longitude |
|
||||
| altitude | number | The current geolocation altitude |
|
||||
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidlocation)
|
||||
107
docs/en/commands/session/other/get-log-types.md
Normal file
107
docs/en/commands/session/other/get-log-types.md
Normal file
@@ -0,0 +1,107 @@
|
||||
# Get available log types
|
||||
|
||||
Get the log for a given log type. Log buffer is reset after each request
|
||||
## Example Usage
|
||||
|
||||
```java
|
||||
// Java
|
||||
Set<String> logEntries = driver.getLogTypes();
|
||||
|
||||
```
|
||||
|
||||
```python
|
||||
# Python
|
||||
log_types = driver.log_types();
|
||||
|
||||
```
|
||||
|
||||
```javascript
|
||||
// Javascript
|
||||
// webdriver.io example
|
||||
driver.log()
|
||||
|
||||
|
||||
|
||||
// wd example
|
||||
const logTypes = await driver.logTypes();
|
||||
|
||||
```
|
||||
|
||||
```ruby
|
||||
# Ruby
|
||||
log_types = @driver.logTypes
|
||||
|
||||
```
|
||||
|
||||
```php
|
||||
# PHP
|
||||
// TODO PHP sample
|
||||
|
||||
```
|
||||
|
||||
```csharp
|
||||
// C#
|
||||
// TODO C# sample
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Client Docs
|
||||
|
||||
* [Java](https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/logging/SessionLogs.html#getLogTypes--)
|
||||
* [Python](http://selenium-python.readthedocs.io/api.html?highlight=get_log#selenium.webdriver.remote.webdriver.WebDriver.log_types)
|
||||
* [Javascript (WebdriverIO)](http://webdriver.io/api/protocol/logTypes.html)
|
||||
* [Javascript (WD)](https://github.com/admc/wd/blob/master/lib/commands.js#L441)
|
||||
* [Ruby](http://www.rubydoc.info/gems/selenium-webdriver/Selenium%2FWebDriver%2FRemote%2FOSS%2FBridge:available_log_types)
|
||||
* [PHP](https://github.com/appium/php-client/)
|
||||
* [C#](https://github.com/appium/appium-dotnet-driver/)
|
||||
|
||||
## Support
|
||||
|
||||
### Appium Server
|
||||
|
||||
|Platform|Driver|Platform Versions|Appium Version|Driver Version|
|
||||
|--------|----------------|------|--------------|--------------|
|
||||
| iOS | [XCUITest](/docs/en/drivers/ios-xcuitest.md) | 9.3+ | 1.6.0+ | All |
|
||||
| | [UIAutomation](/docs/en/drivers/ios-uiautomation.md) | 8.0 to 9.3 | All | All |
|
||||
| Android | [UiAutomator2](/docs/en/drivers/android-uiautomator2.md) | ?+ | 1.6.0+ | All |
|
||||
| | [UiAutomator](/docs/en/drivers/android-uiautomator.md) | 4.2+ | All | All |
|
||||
| Mac | [Mac](/docs/en/drivers/mac.md) | ?+ | 1.6.4+ | All |
|
||||
| Windows | [Windows](/docs/en/drivers/windows.md) | 10+ | 1.6.0+ | All |
|
||||
|
||||
### Appium Clients
|
||||
|
||||
|Language|Support|
|
||||
|--------|-------|
|
||||
|[Java](https://github.com/appium/java-client/releases/latest)| All |
|
||||
|[Python](https://github.com/appium/python-client/releases/latest)| All |
|
||||
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All |
|
||||
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All |
|
||||
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All |
|
||||
|[PHP](https://github.com/appium/php-client/releases/latest)| All |
|
||||
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All |
|
||||
|
||||
## HTTP API Specifications
|
||||
|
||||
### Endpoint
|
||||
|
||||
`POST /session/:session_id/log`
|
||||
|
||||
### URL Parameters
|
||||
|
||||
|name|description|
|
||||
|----|-----------|
|
||||
|session_id|ID of the session to route the command to|
|
||||
|
||||
### JSON Parameters
|
||||
|
||||
None
|
||||
|
||||
### Response
|
||||
|
||||
The list of log types (array<string>)
|
||||
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidlogtypes)
|
||||
109
docs/en/commands/session/other/get-log.md
Normal file
109
docs/en/commands/session/other/get-log.md
Normal file
@@ -0,0 +1,109 @@
|
||||
# Get Logs
|
||||
|
||||
Get the log for a given log type. Log buffer is reset after each request
|
||||
## Example Usage
|
||||
|
||||
```java
|
||||
// Java
|
||||
LogEntries logEntries = driver.getLogs("driver");
|
||||
|
||||
```
|
||||
|
||||
```python
|
||||
# Python
|
||||
logs = driver.get_log('driver');
|
||||
|
||||
```
|
||||
|
||||
```javascript
|
||||
// Javascript
|
||||
// webdriver.io example
|
||||
let logs = driver.log('driver')
|
||||
|
||||
|
||||
|
||||
// wd example
|
||||
const logs = await driver.log('driver');
|
||||
|
||||
```
|
||||
|
||||
```ruby
|
||||
# Ruby
|
||||
@driver.logs('driver')
|
||||
|
||||
```
|
||||
|
||||
```php
|
||||
# PHP
|
||||
// TODO PHP sample
|
||||
|
||||
```
|
||||
|
||||
```csharp
|
||||
// C#
|
||||
// TODO C# sample
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Client Docs
|
||||
|
||||
* [Java](https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/logging/SessionLogs.html#getLogTypes--)
|
||||
* [Python](http://selenium-python.readthedocs.io/api.html?highlight=get_log#selenium.webdriver.remote.webdriver.WebDriver.get_log)
|
||||
* [Javascript (WebdriverIO)](http://webdriver.io/api/protocol/log.html)
|
||||
* [Javascript (WD)](https://github.com/admc/wd/blob/master/lib/commands.js#L455)
|
||||
* [Ruby](http://www.rubydoc.info/gems/selenium-webdriver/Selenium%2FWebDriver%2FTouchActionBuilder:scroll)
|
||||
* [PHP](https://github.com/appium/php-client/)
|
||||
* [C#](https://github.com/appium/appium-dotnet-driver/)
|
||||
|
||||
## Support
|
||||
|
||||
### Appium Server
|
||||
|
||||
|Platform|Driver|Platform Versions|Appium Version|Driver Version|
|
||||
|--------|----------------|------|--------------|--------------|
|
||||
| iOS | [XCUITest](/docs/en/drivers/ios-xcuitest.md) | 9.3+ | 1.6.0+ | All |
|
||||
| | [UIAutomation](/docs/en/drivers/ios-uiautomation.md) | 8.0 to 9.3 | All | All |
|
||||
| Android | [UiAutomator2](/docs/en/drivers/android-uiautomator2.md) | ?+ | 1.6.0+ | All |
|
||||
| | [UiAutomator](/docs/en/drivers/android-uiautomator.md) | 4.2+ | All | All |
|
||||
| Mac | [Mac](/docs/en/drivers/mac.md) | ?+ | 1.6.4+ | All |
|
||||
| Windows | [Windows](/docs/en/drivers/windows.md) | 10+ | 1.6.0+ | All |
|
||||
|
||||
### Appium Clients
|
||||
|
||||
|Language|Support|
|
||||
|--------|-------|
|
||||
|[Java](https://github.com/appium/java-client/releases/latest)| All |
|
||||
|[Python](https://github.com/appium/python-client/releases/latest)| All |
|
||||
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All |
|
||||
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All |
|
||||
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All |
|
||||
|[PHP](https://github.com/appium/php-client/releases/latest)| All |
|
||||
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All |
|
||||
|
||||
## HTTP API Specifications
|
||||
|
||||
### Endpoint
|
||||
|
||||
`POST /session/:session_id/log`
|
||||
|
||||
### URL Parameters
|
||||
|
||||
|name|description|
|
||||
|----|-----------|
|
||||
|session_id|ID of the session to route the command to|
|
||||
|
||||
### JSON Parameters
|
||||
|
||||
|name|type|description|
|
||||
|----|----|-----------|
|
||||
| type | string | The log type |
|
||||
|
||||
### Response
|
||||
|
||||
The list of log entries (array<object>)
|
||||
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidtouchscroll)
|
||||
111
docs/en/commands/session/other/set-geolocation.md
Normal file
111
docs/en/commands/session/other/set-geolocation.md
Normal file
@@ -0,0 +1,111 @@
|
||||
# Set Geolocation
|
||||
|
||||
Set the current geo location
|
||||
## Example Usage
|
||||
|
||||
```java
|
||||
// Java
|
||||
driver.setLocation(new Location(49, 123, 10)); // Must be a driver that implements LocationContext
|
||||
|
||||
```
|
||||
|
||||
```python
|
||||
# Python
|
||||
self.driver.set_location(49, 123, 10)
|
||||
|
||||
```
|
||||
|
||||
```javascript
|
||||
// Javascript
|
||||
// webdriver.io example
|
||||
driver.location({latitude: 121.21, longitude: 11.56, altitude: 94.23});
|
||||
|
||||
|
||||
|
||||
// wd example
|
||||
let location = await driver.sessionCapabilities('c8db88a0-47a6-47a1-802d-164d746c06aa');
|
||||
|
||||
```
|
||||
|
||||
```ruby
|
||||
# Ruby
|
||||
@driver.set_location(121.21, 11.56, 94.23)
|
||||
|
||||
```
|
||||
|
||||
```php
|
||||
# PHP
|
||||
// TODO PHP sample
|
||||
|
||||
```
|
||||
|
||||
```csharp
|
||||
// C#
|
||||
// TODO C# sample
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Client Docs
|
||||
|
||||
* [Java](https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/html5/LocationContext.html#location--)
|
||||
* [Python](http://selenium-python.readthedocs.io/api.html)
|
||||
* [Javascript (WebdriverIO)](http://webdriver.io/api/protocol/location.html)
|
||||
* [Javascript (WD)](https://github.com/admc/wd/blob/master/lib/commands.js#L407)
|
||||
* [Ruby](http://www.rubydoc.info/gems/selenium-webdriver/Selenium%2FWebDriver%2FDriverExtensions%2FHasLocation:set_location)
|
||||
* [PHP](https://github.com/appium/php-client/)
|
||||
* [C#](https://github.com/appium/appium-dotnet-driver/)
|
||||
|
||||
## Support
|
||||
|
||||
### Appium Server
|
||||
|
||||
|Platform|Driver|Platform Versions|Appium Version|Driver Version|
|
||||
|--------|----------------|------|--------------|--------------|
|
||||
| iOS | [XCUITest](/docs/en/drivers/ios-xcuitest.md) | 9.3+ | 1.6.0+ | All |
|
||||
| | [UIAutomation](/docs/en/drivers/ios-uiautomation.md) | 8.0 to 9.3 | All | All |
|
||||
| Android | [UiAutomator2](/docs/en/drivers/android-uiautomator2.md) | ?+ | 1.6.0+ | All |
|
||||
| | [UiAutomator](/docs/en/drivers/android-uiautomator.md) | 4.2+ | All | All |
|
||||
| Mac | [Mac](/docs/en/drivers/mac.md) | ?+ | 1.6.4+ | All |
|
||||
| Windows | [Windows](/docs/en/drivers/windows.md) | 10+ | 1.6.0+ | All |
|
||||
|
||||
### Appium Clients
|
||||
|
||||
|Language|Support|
|
||||
|--------|-------|
|
||||
|[Java](https://github.com/appium/java-client/releases/latest)| All |
|
||||
|[Python](https://github.com/appium/python-client/releases/latest)| All |
|
||||
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All |
|
||||
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All |
|
||||
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All |
|
||||
|[PHP](https://github.com/appium/php-client/releases/latest)| All |
|
||||
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All |
|
||||
|
||||
## HTTP API Specifications
|
||||
|
||||
### Endpoint
|
||||
|
||||
`POST /session/:session_id/location`
|
||||
|
||||
### URL Parameters
|
||||
|
||||
|name|description|
|
||||
|----|-----------|
|
||||
|session_id|ID of the session to route the command to|
|
||||
|
||||
### JSON Parameters
|
||||
|
||||
|name|type|description|
|
||||
|----|----|-----------|
|
||||
| latitude | number | The current geolocation latitude |
|
||||
| longitude | number | The current geolocation longitude |
|
||||
| altitude | number | The current geolocation altitude |
|
||||
|
||||
### Response
|
||||
|
||||
null
|
||||
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#post-sessionsessionidlocation)
|
||||
28
docs/toc.js
28
docs/toc.js
@@ -29,7 +29,12 @@ module.exports = {
|
||||
["Async Script", "async-script.md"],
|
||||
]],
|
||||
["Other", ["other",
|
||||
["Get Orientation", "get-orientation"],
|
||||
["Get Orientation", "get-orientation.md"],
|
||||
["Set Orientation", "set-orientation.md"],
|
||||
["Get Geolocation", "get-geolocation.md"],
|
||||
["Set Geolocation", "set-orientation.md"],
|
||||
["Get Logs", "get-log.md"],
|
||||
["Get Log Types", "get-log-types.md"],
|
||||
]],
|
||||
]],
|
||||
["Element", ["element",
|
||||
@@ -65,10 +70,23 @@ module.exports = {
|
||||
["Set Context", "set-context.md"],
|
||||
]],
|
||||
["Interactions", ["interactions",
|
||||
["Move To", "moveto.md"],
|
||||
["Click", "click.md"],
|
||||
["Button Down", "buttondown.md"],
|
||||
["Button Up", "buttonup.md"],
|
||||
["Mouse", ["mouse",
|
||||
["Move To", "moveto.md"],
|
||||
["Click", "click.md"],
|
||||
["Double Click", "doubleclick.md"],
|
||||
["Button Down", "button-down.md"],
|
||||
["Button Up", "button-up.md"],
|
||||
]],
|
||||
["Touch", ["mouse",
|
||||
["Single Tap", "tap.md"],
|
||||
["Double Tap", "double-tap.md"],
|
||||
["Move", "move.md"],
|
||||
["Touch Down", "touch-down.md"],
|
||||
["Touch Up", "touch-up.md"],
|
||||
["Long Press", "long-press.md"],
|
||||
["Scroll", "scroll.md"],
|
||||
["Flick", "flick.md"],
|
||||
]],
|
||||
]],
|
||||
["Web", ["web",
|
||||
["Window", ["window",
|
||||
|
||||
Reference in New Issue
Block a user