Skip to content

Commit deaa9ed

Browse files
committed
2 parents c59138d + ed84795 commit deaa9ed

File tree

1 file changed

+36
-4
lines changed

1 file changed

+36
-4
lines changed

README.md

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,46 @@ This is an Appium plugin designed to wait for element to be present.
66

77
Appium version 2.0
88

9-
## Installation
9+
## Installation - Server
1010

11-
`appium plugin install source=github https://github.com/saikrishna321/appium-wait-plugin`
11+
Install the plugin using Appium's plugin CLI, either as a named plugin or via NPM:
1212

13-
## Usage
13+
```
14+
appium plugin install element-wait
15+
appium plugin install --source=npm appium-element-wait
16+
```
1417

15-
`appium --plugins=element-wait base-path=/wb/hub/`
18+
## Installation - Client
1619

20+
No special action is needed to make things work on the client side. Just keep sending in your unprefixed caps!
1721

22+
## Activation
1823

24+
The plugin will not be active unless turned on when invoking the Appium server:
1925

26+
```
27+
appium --plugins=element-wait
28+
```
29+
30+
### Example
31+
32+
33+
Before wait-plugin
34+
35+
```
36+
wait = new WebDriverWait(driver, 30);
37+
wait.until(presenceOfElementLocated(MobileBy.AccessibilityId("login"))).click();
38+
wait.until(presenceOfElementLocated(MobileBy.AccessibilityId("slider1")));
39+
driver.findElementByAccessibilityId("slider1").click();
40+
WebElement slider = wait.until(presenceOfElementLocated(MobileBy.AccessibilityId("slider")));
41+
WebElement slider1 = wait.until(presenceOfElementLocated(MobileBy.AccessibilityId("slider1")));
42+
```
43+
44+
45+
After wait-plugin
46+
47+
```
48+
driver.findElementByAccessibilityId("login").click();
49+
driver.findElementByAccessibilityId("slider1").click();
50+
driver.findElementByAccessibilityId("login").sendKeys('Hello');
51+
```

0 commit comments

Comments
 (0)