0

In our project we got a situation to handle an windows based popup after clicking on 'SignIn' button.

We handled it using AutoIt/Robot.

But the real problem occurs while we are trying to handle popup during parallel execution on local machine.

While trying to handle the windows based popup on multiple browsers only the browser that is focused/displaying in front is handled and the remaining browsers autoIt/Robot is not able to handle the popup.

Please suggest

bharadwaj
  • 3
  • 1
  • This kind of situation is hard to deal with robot class, but AutoIT should be able to handle it. You can try switching to the browser instance one by one using autoIT and then give appropriate input. – Kushal Bhalaik Apr 04 '17 at 06:29

2 Answers2

0

Consider changing the way you are handling pop-ups. Each browser instance should do it independently from the others. There are many different solutions to handle pop-ups as there are many ways to implement a pop-up. Please, consider this question for the detailed info.

In short: the main ways to handle pop-ups are: Using windowHandle:

driver.switchTo().window(subWindowHandler); // switch to popup window

Using Alerts

Alert alert = driver.switchTo().alert();
alert.accept();

Using usual approach when working with elements if pop-up can be accessed this way:

WebElement sign = driver.findElement(By.linkText("Sign in"));
sign.click();
WebElement email_id= driver.findElement(By.id("c_uname"));
email_id.sendKeys("hi");

UPD One more important thing here is that your code should be able to address appropriate browser instance when handling pop-ups. Otherwise none of the approacehs will work, obviously. This is another big topic, I don't know your implementation of parallelism, so just pay attention to it as well

Community
  • 1
  • 1
Ivan Pronin
  • 1,768
  • 16
  • 14
0

There is no way to handle such in parallel execution. Robot or Auto it will mix up when 2 windows based pop up opens