mirror of
https://github.com/appium/appium.git
synced 2026-02-11 20:39:04 -06:00
Merge pull request #1998 from danubiusdan/patch-1
added java example code for scrollTo action.
This commit is contained in:
@@ -279,6 +279,15 @@ cases.
|
||||
@driver.execute_script 'mobile: scrollTo', :element => b.ref
|
||||
```
|
||||
|
||||
```Java
|
||||
JavascriptExecutor js = (JavascriptExecutor) driver;
|
||||
WebElement element = wd.findElement(By.name("Log In"));;
|
||||
HashMap<String, String> scrollToObject = new HashMap<String, String>();
|
||||
scrollToObject.put("element",((RemoteWebElement) element).getId());
|
||||
js.executeScript("mobile: scrollTo", scrollToObject);
|
||||
```
|
||||
|
||||
|
||||
### longTap
|
||||
|
||||
* **c#**
|
||||
|
||||
Reference in New Issue
Block a user