webdriver.common package
Submodules
webdriver.common.appiumby module
- class AppiumBy
Bases:
By
- ACCESSIBILITY_ID = 'accessibility id'
- ANDROID_DATA_MATCHER = '-android datamatcher'
- ANDROID_UIAUTOMATOR = '-android uiautomator'
- ANDROID_VIEWTAG = '-android viewtag'
- ANDROID_VIEW_MATCHER = '-android viewmatcher'
- CUSTOM = '-custom'
- IMAGE = '-image'
- IOS_CLASS_CHAIN = '-ios class chain'
- IOS_PREDICATE = '-ios predicate string'
- IOS_UIAUTOMATION = '-ios uiautomation'
- WINDOWS_UI_AUTOMATION = '-windows uiautomation'
webdriver.common.multi_action module
- class MultiAction(driver: WebDriver, element: WebElement | None = None)
Bases:
object
- deprecated:: 2.0.0
Please use W3C actions instead: http://appium.io/docs/en/commands/interactions/actions/
- add(*touch_actions: TouchAction) None
Add TouchAction objects to the MultiAction, to be performed later.
- Parameters:
touch_actions – one or more TouchAction objects describing a chain of actions to be performed by one finger
- Usage:
- a1 = TouchAction(driver)a1.press(el1).move_to(el2).release()a2 = TouchAction(driver)a2.press(el2).move_to(el1).release()MultiAction(driver).add(a1, a2)
- Returns:
Self instance
- Return type:
MultiAction
- property json_wire_gestures: Dict[str, List | str]
- perform() MultiAction
Perform the actions stored in the object.
- Usage:
- a1 = TouchAction(driver)a1.press(el1).move_to(el2).release()a2 = TouchAction(driver)a2.press(el2).move_to(el1).release()MultiAction(driver).add(a1, a2).perform()
- Returns:
Self instance
- Return type:
MultiAction
webdriver.common.touch_action module
- class TouchAction(driver: WebDriver | None = None)
Bases:
object
- deprecated:: 2.0.0
Please use W3C actions instead: http://appium.io/docs/en/commands/interactions/actions/
- property json_wire_gestures: List[Dict]
- long_press(el: WebElement | None = None, x: int | None = None, y: int | None = None, duration: int = 1000) TouchAction
Begin a chain with a press down that lasts duration milliseconds
- Parameters:
el – the element to press
x – x coordiate to press. If y is used, x must also be set
y – y coordiate to press. If x is used, y must also be set
duration – Duration to press, expressed in milliseconds
- Returns:
Self instance
- Return type:
TouchAction
- move_to(el: WebElement | None = None, x: int | None = None, y: int | None = None) TouchAction
Move the pointer from the previous point to the element or point specified
- Parameters:
el – the element to be moved to
x – x coordiate to be moved to. If y is used, x must also be set
y – y coordiate to be moved to. If x is used, y must also be set
- Returns:
Self instance
- Return type:
TouchAction
- perform() TouchAction
Perform the action by sending the commands to the server to be operated upon
- Returns:
Self instance
- Return type:
TouchAction
- press(el: WebElement | None = None, x: int | None = None, y: int | None = None, pressure: float | None = None) TouchAction
Begin a chain with a press down action at a particular element or point
- Parameters:
el – the element to press
x – x coordiate to press. If y is used, x must also be set
y – y coordiate to press. If x is used, y must also be set
pressure – [iOS Only] press as force touch. Read the description of force property on Apple’s UITouch class (https://developer.apple.com/documentation/uikit/uitouch?language=objc) for more details on possible value ranges.
- Returns:
Self instance
- Return type:
TouchAction
- release() TouchAction
End the action by lifting the pointer off the screen
- Returns:
Self instance
- Return type:
TouchAction
- tap(element: WebElement | None = None, x: int | None = None, y: int | None = None, count: int = 1) TouchAction
Perform a tap action on the element
- Parameters:
element – the element to tap
x – x coordinate to tap, relative to the top left corner of the element.
y – y coordinate. If y is used, x must also be set, and vice versa
- Returns:
Self instance
- Return type:
TouchAction
- wait(ms: int = 0) TouchAction
Pause for ms milliseconds.
- Parameters:
ms – The time to pause
- Returns:
Self instance
- Return type:
TouchAction
Module contents
Appium Python Client: WebDriver common classes