Merge pull request #1237 from mgmanikandan87/patch-6

Updated : Java code snippet for Slider
This commit is contained in:
Jonathan Lipps
2013-09-30 01:26:49 -07:00
+12
View File
@@ -18,6 +18,7 @@ While the Selenium WebDriver spec has support for certain kinds of mobile intera
* where to start the swipe on screen or element
* where to end the swipe on screen or element
* **scroll to** (element)
* **slider**
* **shake**
* set the **orientation** with option:
* new orientation (landscape or portrait)
@@ -219,6 +220,17 @@ In these examples, note that the element parameter is always optional.
swipeObject.put("duration", 1.8);
js.executeScript("mobile: swipe", swipeObject);
```
### Slider
* **Java**
```java
// slider values can be string representations of numbers between 0 and 1
// e.g., "0.1" is 10%, "1.0" is 100%
WebElement slider = wd.findElement(By.xpath("//window[1]/slider[1]"));
slider.sendKeys("0.1");
```
### Set orientation