How to get a WEB element from a new POP-up window

Hi all

I can not get the element from the new WEB window that I have POPed up. Please tell me how to deal with it.
Examples of target pages are as follows

http://rgl.faa.gov/Regulatory_and_Guidance_Library/rgFAR.nsf/0/D35BD4C65974CC16862582EA00614ADE?OpenDocument&Highlight=part%2021%202018

Hi @tamotsu_itoieq what web element do you need to get on this page; and how do you open it, from a link on another page?

Maybe, you could share your script to see the action flow?

@tamotsu_itoieq thanks for sending the script.

The link is opened in a new window, so you need to switch to a new window to be able to use xpaths there.
You can try doing it using a custom action, but you can use a workaround - instead of clicking the document, you can get its url and open it using Open website action.

  • get the document’s url using Xpath. The code doesn’t have the entire url, but you can read a part of the url from the “onclick” attribute

In the example below I got the the values of “onclick” attribute of all document links (using xpath //*[@id="ScrollArea"]/p/table/tbody/tr[2]/td/table/tbody//tr/td[3]/font/u/a) on the page and saved to a List variable, but you can use the xpath for each document and save to a String variable.

  • then you can extract the part of the document’s url you need from the value that you saved using Substring between (it will be the part between openSearchHit(' and '); )

  • then you can open the document using Open website actions and get the information you need using Xpath. To get its correct url, you can combine the result of the Substring between action with the domain url (http://rgl.faa.gov)

I hope this will help

Hi Alesia
Thank you for your support.
Difficult processing is necessary to get the data.
I do not understand the processing flow that you describe.
I need to learn more about the RPA process.

Hi Alesia
Thank you for your support.
I understood your proposal.

Hi Tamotsu,

Sorry if the explanation was confusing. Glad you sorted it out.
Let me know if you need still need the recording.

Hi @ashapkina

I have use the same step of getting web element and sub string unfortunately it is not working please advice
I am getting a text
Kindly advice

@h01234567 can you share more details about your issue, for example, what value the web element action saves and what values you need to get?

@ashapkina, i am unable to get the web element from the pop up window in chrome . Error says that it is unable to switch to window.

@shivangee_sunX can you share your recording?

This issue is resolved now. i checked the attribute “search in iframe”

1 Like