How to confirm a Chrome alert (pop-up window)?
Hi, I am using Parasoft SOATest to test a WebApp automatically. In one case a Chrome alert appears and behaves like a modal pop-up window, I would like Parasoft to confirm it automatically, that means clicking on the OK button or pressing the Enter key.
How can I achieve it?
I did not find any build-in function to confirm the alert, furthermore I have tried it using JavaScript action and a groovy script in the extension tool, nothing of the mentioned above worked. Maybe you have an idea? I am using Parasoft SOAtest & Virtualize Version 2021.2
Many thanks in advance!
Answers
-
See "Accept Script Dialog" in the docs page https://docs.parasoft.com/display/SOA20252/Modifying+User+Actions+Simulated+by+a+Web+Scenario+SOAtest
0 -
Thanks for the quick response, tried this action, too, but it did not confirm the pop-up. Maybe it is because the pop-up does not belong to the WebApp that is being tested, but comes from Chrome itself: It is an alert about passwords and it cannot be located or inspected with the usual browser dev tools.
0 -
For interacting with user interface elements that are not part of the web page we have suggested adding a External tool to run an external script. We typically suggest creating the script with AutoIt.
An alternative would be to disable the password manager completely. By default, a temporary Chrome browser profile is created on playback each time. However, there is a way for SOAtest to tell Chrome to always use a specific browser profile, like one that has "Offer to save passwords" disabled in the Chrome password manager settings. You can tell Chrome what profile directory to use by passing a "--user-data-dir" argument. You can then tell SOAtest to pass the same "--user-data-dir" argument each time it starts Chrome. Some detail can be found here: Using Chrome Extensions and Configurations During Recording and Playback
0