What is POP-UP messages?
A Pop-up message is a small window that appears on a web-site and displays a message or request.
Pop-up messages can be triggered by a variety of events ,such as when a website wants to show a message or when an application need the user to make a decision.
This blog addresses following items:
1.How to suppress Chrome browser level Pop-ups while running automation scripts from Selenium.
2.When validation messages show up and close for which you cannot use inspect.
3.How to suppress personalized your web experience message in EDGE browser.
1.Eliminating Chrome browser level pop-ups when running automation scripts from Selenium.
Suppose if we get any messages like this
We can use the following code to eliminate it in InitializationDriver method()
2.When validation messages show up and close for which you cannot use inspect.
We can use the code given below to suppress it in respective page.java file.
Suppose, if we get message like this in Microsoft edge browser ,let us see the code to suppress the message.
Implement the following code in test base class and it will suppress the above message :
Result: No message is displayed when you run with the above code.
So, Using the above codes we can eliminate the POP-UP messages.
Happy Reading
Kommentare