Skip to content

Increasing the Amount of scroll needed #35

Increasing the Amount of scroll needed

Increasing the Amount of scroll needed #35

Triggered via push June 5, 2023 19:27
Status Failure
Total duration 1m 27s
Artifacts 1
Fit to window
Zoom out
Zoom in

Annotations

3 errors
Validating the parsed results based on the type of the file uploaded › Script Generation with one key command: __tests__/testParserFlow.test.ts#L306
expect(received).toBe(expected) // Object.is equality - Expected - 9 + Received + 2 @@ -31,28 +31,21 @@ const pageClass = new Locators(); async function simple_scroll_test() { await browser.url("https://www.google.com"); - console.warn(await browser.getWindowRect(), "before"); - await browser.setWindowRect(0, 0, 1280, 800); - // await browser.setWindowSize(1280, 800); - console.warn(await browser.getWindowRect(), "after"); + await browser.setWindowSize(1296, 1080); await pageClass.searchBar.waitForEnabled({ reverse: false, timeout: 3500 }); await pageClass.searchBar.click(); await pageClass.searchBar.setValue("Rem Chan"); await expect(pageClass.searchBar).toHaveValue("Rem Chan"); await browser.keys([Key.Enter]); await browser.pause(1000); - await browser.saveScreenshot("./beforeScroll.png"); - await browser.execute("window.scrollTo(0,3000)"); + await browser.execute("window.scrollTo(0,900)"); - await browser.saveScreenshot("./afterScroll.png"); - await pageClass._2rdPage.scrollIntoView(); await pageClass._2rdPage.waitForDisplayed({ reverse: false, timeout: 3000 }); await pageClass._2rdPage.click(); await browser.execute("window.scrollTo(0,document.body.scrollHeight)"); - await pageClass._4rdPage.scrollIntoView(); await pageClass._4thPage.click(); } ; (async () => { await simple_scroll_test(); at Object.<anonymous> (__tests__/testParserFlow.test.ts:306:61)
Running the ensured tests in order to check if the results generated are correct › File Generated: $file: __tests__/expectation/scrollScript.js#L49
Command failed: node "/home/runner/work/WTicks/WTicks/__tests__/expectation/scrollScript.js" { width: 1200, height: 900, x: 0, y: 0 } before { width: 1280, height: 800, x: 0, y: 0 } after file:///home/runner/work/WTicks/WTicks/node_modules/webdriverio/build/utils/implicitWait.js:29 throw new Error(`Can't call ${commandName} on element with selector "${currentElement.selector}" because element wasn't found`); ^ Error: Can't call scrollIntoView on element with selector "=2" because element wasn't found at implicitWait (file:/home/runner/work/WTicks/WTicks/node_modules/webdriverio/build/utils/implicitWait.js:29:19) at async Element.elementErrorHandlerCallbackFn (file:/home/runner/work/WTicks/WTicks/node_modules/webdriverio/build/middlewares.js:14:29) at async Element.wrapCommandFn (file:/home/runner/work/WTicks/WTicks/node_modules/@wdio/utils/build/shim.js:72:29) at async simple_scroll_test (file:/home/runner/work/WTicks/WTicks/__tests__/expectation/scrollScript.js:49:2) at async file:/home/runner/work/WTicks/WTicks/__tests__/expectation/scrollScript.js:58:2 Node.js v18.16.0 at __tests__/testPraticalResults.test.ts:11:24
test
Process completed with exit code 1.

Artifacts

Produced during runtime
Name Size
my-artifact Expired
756 KB