File tree 1 file changed +4
-8
lines changed
1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -14,15 +14,11 @@ const puppeteer = require('puppeteer');
14
14
15
15
// Type into search box
16
16
await page . waitForSelector ( '#docsearch-input' ) ;
17
+ await page . type ( '#docsearch-input' , 'Experimental WebDriver BiDi support' , { delay : 150 } ) ;
17
18
18
- // Wait for search result
19
- await page . type ( '#docsearch-input' , 'chipi chipi chapa chapa' , { delay : 150 } ) ;
20
-
21
- // Get the `Docs` result section
22
- await page . waitForSelector ( '#docsearch-item-5' ) ;
23
-
24
- // Click on first result in `Docs` section
25
- await page . click ( '#docsearch-item-5' ) ;
19
+ // Wait for search result and click on the first result
20
+ await page . waitForSelector ( '.DocSearch-Hit-content' ) ;
21
+ await page . click ( '.DocSearch-Hit-content' ) ;
26
22
27
23
// Locate the title
28
24
let textSelector = await page . waitForSelector ( 'h1' ) ;
You can’t perform that action at this time.
0 commit comments