Skip to content

Commit 1563023

Browse files
committed
clearer
1 parent afaae78 commit 1563023

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,19 @@ fwd.element("bazelementname", id("results")).getText().shouldBe("1 result");
9090
### within()
9191

9292
There's a "within" capability in the fluent language. It will keep retrying a locator for a given period of time.
93-
The fluent expression (the locator) is given a chance to get past a slowly appearing element in the page:
93+
The fluent expression (the locator) is given a chance find a slowly appearing element in the page, and do so in the minimum amount of elapsed time needed. Then when found, the fluent expression continues:
9494

9595
```java
9696
fwd.div(id("foo")).div(className("bar")).within(secs(5)).button().click();
9797

98-
fwd.span(id("results").within(millis(200)).getText().shouldBe("123");
98+
fwd.within(secs(5)).div(id("foo")).span(className("baz")).button(className("ok")).click();
9999
```
100100

101-
This will throw an exception **after** the elapsed time, if the element still hasn't appeared in the page's DOM.
101+
The `within()` operation will throw an exception **after** the elapsed time, if the element still hasn't appeared in the page's DOM.
102102

103-
As well as `millis(..)` and `secs(..)`, there is also `mins(..)`
103+
As well as `secs(..)`, there is also `millis(..)` and `mins(..)` for time periods.
104+
105+
Also see "String Assertions / within" below.
104106

105107
### without()
106108

0 commit comments

Comments
 (0)