-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Click on download and print buttons using element.click function in scripting integration tests #12819
Conversation
/botio integrationtest |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 0 Live output at: http://54.67.70.0:8877/427409369e3c7ab/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 0 Live output at: http://3.101.106.178:8877/bb64d23f46cacf1/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/427409369e3c7ab/output.txt Total script time: 2.88 mins
|
From: Bot.io (Windows)FailedFull output at http://3.101.106.178:8877/bb64d23f46cacf1/output.txt Total script time: 3.64 mins
|
91d4ccc
to
660a8b3
Compare
/botio integrationtest |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 0 Live output at: http://3.101.106.178:8877/4082b831b8f46be/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 0 Live output at: http://54.67.70.0:8877/33ab3ffb7d9171e/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/33ab3ffb7d9171e/output.txt Total script time: 2.78 mins
|
From: Bot.io (Windows)FailedFull output at http://3.101.106.178:8877/4082b831b8f46be/output.txt Total script time: 4.23 mins
|
660a8b3
to
42b849e
Compare
/botio integrationtest |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 0 Live output at: http://54.67.70.0:8877/13e3b31da185bff/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 0 Live output at: http://3.101.106.178:8877/6f4f7c2738da5c9/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/13e3b31da185bff/output.txt Total script time: 2.82 mins
|
From: Bot.io (Windows)SuccessFull output at http://3.101.106.178:8877/6f4f7c2738da5c9/output.txt Total script time: 3.69 mins
|
42b849e
to
23211ae
Compare
…cripting integration tests
23211ae
to
5862e94
Compare
/botio integrationtest |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 0 Live output at: http://3.101.106.178:8877/5467857c4cac5c1/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 0 Live output at: http://54.67.70.0:8877/f058f1f3ae6a2a9/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/f058f1f3ae6a2a9/output.txt Total script time: 2.85 mins
|
From: Bot.io (Windows)SuccessFull output at http://3.101.106.178:8877/5467857c4cac5c1/output.txt Total script time: 3.84 mins
|
I'm a bit confused since the integration test that apparently broke in the other PR seems to just pass (as expected) now when I look at #12394 (comment). Is this patch really still necessary given this? |
When the test was failing, I had an open connection through rdp to the windows bot and it's probably the root cause. |
The Puppeteer API documentation at https://pptr.dev/#?product=Puppeteer&version=v5.5.0&show=api-pageclickselector-options states: "This method fetches an element with selector, scrolls it into view if needed, and then uses page.mouse to click in the center of the element. If there's no element matching selector, the method throws an error." I'm therefore not really seeing how this is related to the buttons not being visible since Puppeteer will scroll them into view anyway, so therefore I'm not really convinced if a) there is a bug here and b) if this is the right fix. If it can be reproduced, it sounds more like a bug report for Puppeteer (but note also https://stackoverflow.com/questions/51857070/puppeteer-in-nodejs-reports-error-node-is-either-not-visible-or-not-an-htmlele that states that it might also simply be a problem in the test itself). Let's close this for now and if this returns we can reconsider, but given the Puppeteer API information |
I tried to wait on |
In that case, wouldn't setting the viewport as stated on https://stackoverflow.com/questions/51857070/puppeteer-in-nodejs-reports-error-node-is-either-not-visible-or-not-an-htmlele (using It seems very much like an edge case since the browser are normally not manually touched when the tests run, so if we want to address this I think that's a much simpler fix. |
Yeah, I thought about that too but I almost don't know how the bot works (I'm not a windows expert) and what are the available screen size... and I don't really understand why opening the bot through rdp and remmina can change the window size... |
@timvandermeij unfortunately we're starting the browser using Line 835 in a10dc1c
|
Ugh, it seems like this re-appeared in #12875 and other PRs, so we'll need some solution here. Perhaps we can do this for now, with a clear comment added as to why we do this instead of |
I'm pretty sure that's because the window is too small and then the button to save goes to the |
Yes, if that's the case then your explanation makes sense. If the window is too small, the save button is indeed pushed into the secondary toolbar. Since we didn't really have this before, let's indeed keep using |
If for any reason the save/print buttons aren't on screen (no height), the
page.click
is failing.So replace
page.click
bydocument.querySelector(...).click()
.