appium
Version:
Automation for Apps.
79 lines (71 loc) • 2.17 kB
YAML
name: Switch to Frame
short_description: Change focus to another frame on the page (Web context only)
description:
|
If the frame id is null, the server should switch to the page's default content
example_usage:
java:
|
driver.switchTo().frame(3);
python:
|
self.driver.switch_to.frame(3)
javascript_wd:
|
await driver.frame(3);
javascript_wdio:
|
driver.frame(3);
ruby:
|
@driver.switch_to.frame(3)
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebDriver.TargetLocator.html#frame-int-"
python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webdriver.WebDriver.switch_to_frame"
javascript_wdio: "http://webdriver.io/api/protocol/frame.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L332"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Remote/W3C/Bridge:switch_to_frame"
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: false
uiautomation: false
android:
uiautomator2: false
uiautomator: false
mac:
mac: false
windows:
windows: false
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/frame
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: id
type: string|number|null|WebElement JSON Object
description: Identifier for the frame to change focus to.
# Links to specifications. Should link to at least one specification
specifications:
w3c: https://www.w3.org/TR/webdriver/#dfn-switch-to-frame
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidurl