Skip to content

Commit 2e782fe

Browse files
committed
chore(docs): add wait for section
1 parent 5843fb5 commit 2e782fe

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

book/src/website.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,34 @@ Add delays between pages. Defaults to none.
108108
const website = new Website('https://choosealicense.com').withDelays(200).build()
109109
```
110110

111+
### Wait_For_Delay
112+
113+
Wait for a delay on the page. Should only be used for testing. This method does nothing if the `chrome` feature is not enabled.
114+
The first param is the seconds of delay and the second is the nano seconds to delay by.
115+
116+
```ts
117+
// a delay of 2 seconds and 500 nanos
118+
const website = new Website('https://choosealicense.com').with_wait_for_delay(2, 500).build()
119+
```
120+
121+
### Wait_For_Selector
122+
123+
Wait for a a selector on the page with a max timeout. This method does nothing if the `chrome` feature is not enabled.
124+
125+
```ts
126+
// a delay of 2 seconds and 500 nanos
127+
const website = new Website('https://choosealicense.com').with_wait_for_selector('.news-feed', 2, 500).build()
128+
```
129+
130+
### Wait_For_Idle_Network
131+
132+
Wait for idle network request. This method does nothing if the `chrome` feature is not enabled.
133+
134+
```ts
135+
// a delay of 2 seconds and 500 nanos
136+
const website = new Website('https://choosealicense.com').with_wait_for_idle_network(2, 500).build()
137+
```
138+
111139
### User-Agent
112140

113141
Use a custom User-Agent.

0 commit comments

Comments
 (0)