Mouse click on a new popup opened using Xpath

mouse-click
popup
new-browser-window

#1

Hi,
While working on web element if a new browser window /popup is opened the mouse click using Xpath doesn’t work…

Is there any way to get it worked?

I am using the RPA 1.1.6 version…

Thanks


#2

@Nilesh_Singh,

please add more description, screenshot, page source code


#3

Using a X path mouse click when I click on a button …A page opens in New WINDOW of browser.
When I use Mouse click using Xpath for that newly opened popup window…Workfusion is not able to find the x path. Please find the screen shot

.


#4

Those and Iframes, aren’t they? They are a bit tricky to work with.

But first, try to add a click onto the new window to be sure its the active window.

You need to target the iframe

https://kb.workfusion.com/display/TR/Handling+iFrames


#5

Hey kyle,
Thanks for reply.
Tried the way you suggested, but it didn’t worked for me.
On click of login , the page is redirected to 2nd page in form of a new window/popup .
I think it doesn’t contain any frame set.


#6

The left side looks like a classic Iframe, I would look at that again.

Try running this code in your BP:


 JavascriptExecutor exe = (JavascriptExecutor) driver;
 Integer numberOfFrames = Integer.parseInt(exe.executeScript("return window.length").toString());
 System.out.println("Number of iframes on the page are " + numberOfFrames);
 
 //By finding all the web elements using iframe tag
 List<WebElement> iframeElements = driver.findElements(By.tagName("iframe"));
 System.out.println("The total number of iframes are " + iframeElements.size());

#7

@Nilesh_Singh,

thanks for reporting this interesting use case. We will try to provide a possibility to automate it in next releases.


#8

Tried to access the kb link, but unable to login. Please assist.
https://kb.workfusion.com/display/TR/Handling+iFrames