Xpath selector does not work with new popup window

Hi
Here is the use case I am trying to automate. I am opening a web page which is having a register doctor link, clicking on the register button opens a doctor registration page in a new popup window, there are several fields on the form. Trying to set all these fields on the form using XPath but no luck, XPath doesn’t work here.

Hi @aashu.singh,
Could you please share the page on which you’re trying to get Xpath?
Also, what exactly you want to click on it?

First click on the search register button as suggested in mainscreen.png file which will open new page in popup window.now enter enter any number in it and click on search button as suggested in popup window png file.

@aashu.singh as the page is opened in a new window, you need to switch to it first using this custom action:

@CustomScriptAction(
)
 
def customScript() {
   switchToNextWindow()
}

See more examples here: https://kb.workfusion.com/display/RPAe/Code+Samples#CodeSamples-Switchingbetweenwindows/tabs

Also, the elements on this page are located in iframes, so you need to provide the XPats of the iframes, too.

2 Likes

Thank you @ashapkina, thanks for the quick resolution :slight_smile:

1 Like