Appium-Active Element(有源条件)

Get Active Element


Gets the active element of the current session //获取当前会话的活动元素

Example Usage
JavaWebElement currentElement = driver.switchTo().activeElement();
Pythonelement = driver.switch_to.active_element
Javascript// webdriver.io example
driver.getActiveElement();

// wd example
let element = await driver.active();
Ruby# ruby_lib example
switch_to.active_element

# ruby_lib_core example
@driver.switch_to.active_element
C#IWebElement currentElement = driver.SwitchTo().ActiveElement();
PHP// TODO PHP sample
Description

The submit command may also be applied to any element that is a descendant of a FORM element (Web only) //submit命令还可以应用于作为表单元素的后代的任何元素(仅限Web)

Support
Appium Server
PlatformDriverPlatform VersionsAppium VersionDriver Version
iOSXCUITestNoneNoneNone
UIAutomation8.0 to 9.3AllAll
AndroidEspresso?+1.9.0+All
UiAutomator2?+1.6.0+All
UiAutomator4.3+AllAll
MacMac?+1.6.4+All
WindowsWindows10+1.6.0+All
Appium Clients
LanguageSupportDocumentation
JavaAllseleniumhq.github.io
PythonAllselenium-python.readthedocs.io
Javascript (WebdriverIO)All
Javascript (WD)Allgithub.com
RubyAllwww.rubydoc.info
PHPAllgithub.com
C#Allgithub.com
HTTP API Specifications
Endpoint

GET /session/:session_id/element/:element_id/equals/:other_element_id

URL Parameters
namedescription
session_idID of the session to route the command to
element_idID of the element
element_idID of the other element to check if they’re equal
JSON Parameters

None

Response

Whether the two ID’s refer to the same element (boolean) //两个ID是否引用同一元素(布尔值)

相关文章

前言:appium可以说是app最火的一个自动化框架,它的主要优势...
(原文:https://www.cnblogs.com/fancy0158/p/10047906.htm...
一Appium介绍1.1含义开源,跨平台,多语言支持的移动应用自动...
前言:Appium是一个自动化测试开源工具,支持iOS平台和Andro...
转:https://blog.csdn.net/Tigerdong1/article/details/801...
(原文:https://www.cnblogs.com/fancy0158/p/10056418.htm...