Appium-button-up

Button Up

Releases the mouse button previously held
//: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/interactions/mouse/button-up.yml)

Example Usage

// Java
Actions action = new Actions(driver);
action.moveTo(element);
action.clickAndHold();
action.moveTo(element, 10, 10);
action.release();
action.perform();

# Python
actions = ActionChains(driver)
actions.move_to_element(element)
actions.click_and_hold()
actions.move_to_element(element, 10, 10)
action.release();
actions.perform()

// Javascript
// webdriver.io example
driver.moveTo(element);
driver.buttonDown();
driver.moveTo(element, 10, 10);
driver.buttonUp();

// wd example
await driver.moveTo(element);
await driver.buttonDown();
await driver.moveTo(element, 10, 10);
await driver.buttonUp();

# Ruby
# ruby_lib example
action.click_and_hold(el).move_to(el, 10, 10).release.perform

# ruby_lib_core example
@driver.action.click_and_hold(el).move_to(el, 10, 10).release.perform

# PHP
// TODO PHP sample

// C#
Actions action = new Actions(driver);
action.MoveToElement(element);
action.ClickAndHold();
action.MoveToElement(element, 10, 10);
action.Release();
action.Perform();

Description

Must be called once for every buttondown command issued. See the note in click and buttondown about implications of out-of-order commands.

Support

Appium Server

Platform Driver Platform Versions Appium Version Driver Version
iOS XCUITest None None None
UIAutomation None None None
Android UiAutomator2 None None None
Espresso None None None
UiAutomator None None None
Mac Mac ?+ 1.6.4+ All
Windows Windows 10+ 1.6.0+ All

Appium Clients

HTTP API Specifications

Endpoint

POST /session/:session_id/buttonup

URL Parameters

name description
session_id ID of the session to route the command to

JSON Parameters

name type description
button number Which button, {LEFT = 0, MIDDLE = 1 , RIGHT = 2}. Defaults to the left mouse button if not specified

Response

null

See Also

官方链接为:Button Up - Appium