mirror of
https://github.com/appium/appium.git
synced 2026-04-30 07:19:50 -05:00
Merge pull request #2887 from edgy360/master
Add 'Scroll To' to code examples
This commit is contained in:
@@ -597,6 +597,38 @@ todo: php
|
||||
driver.Zoom(100, 200);
|
||||
```
|
||||
|
||||
## Scroll To
|
||||
|
||||
Scroll to an element.
|
||||
|
||||
```ruby
|
||||
element = find_element :name, 'Element Name'
|
||||
execute_script "mobile: scrollTo", :element => element.ref
|
||||
```
|
||||
|
||||
```python
|
||||
todo: python
|
||||
```
|
||||
|
||||
```java
|
||||
WebElement element = driver.findElement(By.name("Element Name"));
|
||||
HashMap<String, String> arguments = new HashMap<String, String>();
|
||||
arguments.put("element", element.getId());
|
||||
(JavascriptExecutor)driver.executeScript("mobile: scrollTo", arguments);
|
||||
```
|
||||
|
||||
```javascript
|
||||
todo: javascript
|
||||
```
|
||||
|
||||
```php
|
||||
todo: php
|
||||
```
|
||||
|
||||
```csharp
|
||||
todo: csharp
|
||||
```
|
||||
|
||||
## Pull file
|
||||
|
||||
Pulls a file from the device.
|
||||
|
||||
Reference in New Issue
Block a user