While trying to open a hyperlink in my native app automation test, I am getting pop up “Open with Chrome ‘Just Once’ / ‘Always’” pop up. This is failing my automation tests. Is there anyway to bypass this pop up?
Hello Toby-steed,
You can write the code to change the context of the apps and click “Always” button like below. You need to find the xpath of the element first.
try{
waitABit(5000);
MobileElement btnFitaStage = Util.threadLocal.get().findElement(By.xpath(btnFitaStageXPath));
btnFitaStage.click();
MobileElement btnAlwaysAllow = Util.threadLocal.get().findElement(By.xpath(btnAlwaysAllowXPath));
btnAlwaysAllow.click();
}catch (Exception e){
}