Hello, does anyone know how to detect and close these alerts that might appear in Chrome when leaving from a website with unsaved changes. Example:
There are some Chrome command line arguments that helps make the browser more automation friendly. See 2nd half of this page: https://support.smartbear.com/testcomplete/docs/app-testing/web/general/preparing-browsers/chrome.ht...
Hello @mattb, I couldn't find any reference to how to handle alerts on the link you provided.
I just need a way to either confirm or decline the alert pop up. In selenium there is somehting like switchTo.Alert.Confirm() or switchTo.Alert.Decline(). I need to interact with these type of alerts in TestComplete and still I couldn't find anything in the documentation.
We could just interact with the pop up, I would recommend just using a single action at first to see what it is identified with. When you interact with it via keyword test, it will automatically map the object (With Se or with Properties, depending on how its identified)
Those command line arguments I passed before, are browser specific arguments, that help force the browser to be more automation friendly.
Thanks @mattb, unfortunately the object spy does not work to detect the alert in my chrome browser, nor there is documentation about this basic feature that is present in all browsers.
I appreciate the recommendations about the command line arguments, but in a real world scenario the users do not open their browsers with command line arguments, so it is highly NOT recommended to test the applications in a way the user would not use them.
Hi @TCYKPB, see if this helps:
SmartBear Documentation Team Lead
Hi @HKosova , I already tried with [...].Alert.Button("OK").Click(); as in the example, and with any other form I could think of, and all I got was an error message saying "Unable to find object Alert."
Can this window be identified using Object Spy / Object Browser?
Might be something related to https://community.smartbear.com/t5/TestComplete-Functional-Web/Login-object-cannot-be-found-anymore/...
/Alex [Community Hero]
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
Tried with the "Confirm" object, also getting "Unable to find the object Confirm".
Object spy does not work either, when I hover over the alert, TestComplete just freezes and stops working.