File tree Expand file tree Collapse file tree 3 files changed +53
-7
lines changed
Expand file tree Collapse file tree 3 files changed +53
-7
lines changed Original file line number Diff line number Diff line change 1717 - type : console
1818 command : sleep '__GMT_VAR_SLEEP__'
1919
20+ - name : Check HTTP Status Code
21+ container : gmt-playwright-nodejs
22+ hidden : true
23+ commands :
24+ - type : playwright
25+ command : if (!page_result.ok()) throw `Page was not accessible. HTTP Return code ${page_result.status()}`
26+
2027 - name : Scroll down and wait for __GMT_VAR_SLEEP__ s
2128 container : gmt-playwright-nodejs
2229 commands :
3946 }
4047 - type : console
4148 command : sleep '__GMT_VAR_SLEEP__'
42-
43- - name : Check HTTP Status Code
44- container : gmt-playwright-nodejs
45- hidden : true
46- commands :
47- - type : playwright
48- command : if (!page_result.ok()) throw `Page was not accessible. HTTP Return code ${page_result.status()}`
Original file line number Diff line number Diff line change 3030 commands :
3131 - type : playwright
3232 command : if (!page_result.ok()) throw `Page was not accessible. HTTP Return code ${page_result.status()}`
33+
34+ - name : Scroll down and wait for __GMT_VAR_SLEEP__ s
35+ container : gmt-playwright-nodejs
36+ commands :
37+ - type : playwright
38+ command : |
39+ let loop_ticks = 0;
40+ const max_loop_ticks = 200;
41+
42+ while (loop_ticks < max_loop_ticks) {
43+ const atBottom = await page.evaluate(() => {
44+ const d = document.documentElement;
45+ return d.scrollTop + window.innerHeight >= d.scrollHeight;
46+ });
47+ if (atBottom) break;
48+
49+ await page.mouse.wheel(0, 200);
50+ await page.waitForTimeout(200);
51+
52+ loop_ticks++;
53+ }
54+ - type : console
55+ command : sleep '__GMT_VAR_SLEEP__'
Original file line number Diff line number Diff line change 4343 - type : playwright
4444 command : if (!page_result.ok()) throw `Page was not accessible. HTTP Return code ${page_result.status()}`
4545
46+ - name : Scroll down and wait for __GMT_VAR_SLEEP__ s
47+ container : gmt-playwright-nodejs
48+ commands :
49+ - type : playwright
50+ command : |
51+ let loop_ticks = 0;
52+ const max_loop_ticks = 200;
53+
54+ while (loop_ticks < max_loop_ticks) {
55+ const atBottom = await page.evaluate(() => {
56+ const d = document.documentElement;
57+ return d.scrollTop + window.innerHeight >= d.scrollHeight;
58+ });
59+ if (atBottom) break;
60+
61+ await page.mouse.wheel(0, 200);
62+ await page.waitForTimeout(200);
63+
64+ loop_ticks++;
65+ }
66+ - type : console
67+ command : sleep '__GMT_VAR_SLEEP__'
68+
4669
4770 - name : Dump Log (Load and idle)
4871 hidden : true
You can’t perform that action at this time.
0 commit comments