Some times a messenger pop up comes up on application which is completely random. It may appear in any page and also not as soon as you land on a page. It may take a while to pop up. It is basically company updates or any new feature release related. Is there a way to handle it using Capabilities class or how to handle it?
3 Answers
It is not random. As you said: "It is basically company updates or any new feature release related"
Feature flags solve your problem, by allowing you to select parts of the of the application to be included or not in a build, through configuration files, e.g.
Thus, you only need to configure these updates to be display only on the environments they make sense.
Id use an If statement on any page it can appear:
If(pop is visible)
{
close popup();
}
else{
}
-
1This impacts performance and opens space to conditional hell freecodecamp.org/news/… Commented Sep 5, 2019 at 10:47
I would find the locator of button on the popup. Then, You can surround the button click() in a try-catch block:
try{
btn.click();
} catch(Exception e){
System.out.println("No Button Found");
}