testdriverai 7.8.0-test.62 → 7.8.0-test.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/examples/scroll.test.mjs +1 -12
- package/package.json +1 -1
package/examples/scroll.test.mjs
CHANGED
|
@@ -12,19 +12,8 @@ import { getDefaults } from "./config.mjs";
|
|
|
12
12
|
describe("Scroll Test", () => {
|
|
13
13
|
it("should navigate and scroll down the page", async (context) => {
|
|
14
14
|
const testdriver = TestDriver(context, { ...getDefaults(context), headless: true });
|
|
15
|
-
await testdriver.provision.chrome({ url: '
|
|
15
|
+
await testdriver.provision.chrome({ url: 'https://www.webhamster.com/' });
|
|
16
16
|
|
|
17
|
-
// Give Chrome a moment to fully render the UI
|
|
18
|
-
await new Promise(resolve => setTimeout(resolve, 2000));
|
|
19
|
-
|
|
20
|
-
// Navigate to webhamster.com - just look for the domain, not the full path
|
|
21
|
-
const urlBar = await testdriver.find(
|
|
22
|
-
"testdriver-sandbox.vercel.app, the URL in the address bar",
|
|
23
|
-
);
|
|
24
|
-
await urlBar.click();
|
|
25
|
-
await testdriver.pressKeys(["ctrl", "a"]);
|
|
26
|
-
await testdriver.type("https://www.webhamster.com/");
|
|
27
|
-
await testdriver.pressKeys(["enter"]);
|
|
28
17
|
|
|
29
18
|
// Wait for page to load and click heading
|
|
30
19
|
const heading = await testdriver.find(
|