cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pjwilson87
Helper I
Helper I

Extract Data From Web Page - iFrame Issue

I am having trouble using the 'Extract data from web page' action on a site that has an iFrame.

I have scraped data from other web sites with PAD that have an iFrame, but this one I cannot seem to figure out.

Is it possible to extract elements such as the job titles, job URLs, and location from this site?

If not, are there any alternatives?

 

Example:  https://www.cityfm.us/opportunities/

 

PAD Flow:

 

PAD_Flow.png

 

Copy/Paste PAD workflow:

 

WebAutomation.LaunchChrome.LaunchChrome Url: $'''https://www.cityfm.us/opportunities/''' WindowState: WebAutomation.BrowserWindowState.Normal ClearCache: False ClearCookies: False Timeout: 60 BrowserInstance=> Browser
WAIT 1
WebAutomation.ExtractData.ExtractSingleValue BrowserInstance: Browser ExtractionParameters: {[$'''html > body > div:eq(0) > div:eq(0) > div:eq(1) > div > div > div > div > div > p:eq(0) > iframe > html > body > div:eq(0) > form > table > tbody > tr:eq(2) > td > div[class=\"gnewtonCareerGroupRowClass\"] > div:eq(0) > a''', $'''Own Text''', $''''''] } ExtractedData=> JobsTable

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Waylold
Advocate II
Advocate II

@pjwilson87 , couple suggestions I would have. 

 

  1. Simplify by going directly to the iframe nested site. You can get this detail from the iframe itself, by inspecting it with chrome. You can then run your extract against that: Waylold_0-1639576313767.png

     

  2. If you HAVE to work within the confines of the site,  you'll need to get creative with java to specify the iFrame within the document (website) to target it directly as you have been. Below is something I use as a base for these types of functions: 

 

 

var iframe = document.getElementById('IFRAMENAMEHERE');
var elmnt = iframe.contentWindow.document.getElementById('ELEMENTNAMEHERE');

 

 

View solution in original post

6 REPLIES 6
bjjkjjyy
New Member

I have the same issue.

Hope for solutions.

Waylold
Advocate II
Advocate II

@pjwilson87 , couple suggestions I would have. 

 

  1. Simplify by going directly to the iframe nested site. You can get this detail from the iframe itself, by inspecting it with chrome. You can then run your extract against that: Waylold_0-1639576313767.png

     

  2. If you HAVE to work within the confines of the site,  you'll need to get creative with java to specify the iFrame within the document (website) to target it directly as you have been. Below is something I use as a base for these types of functions: 

 

 

var iframe = document.getElementById('IFRAMENAMEHERE');
var elmnt = iframe.contentWindow.document.getElementById('ELEMENTNAMEHERE');

 

 

Thanks @Waylold. This is perfect!

mattjk
Regular Visitor

I'm using the free version of PAD on windows 10, and I could use a hand, I can't figure out how you are able to view / edit a text representation of the workflow.

 

I'm having a similar problem with an iframe that I might post about. But generally I can edit a workflow, but other than what is allowed via the PAD operations, I can't figure out how to open it in an editor and just type it in directly.

 

Any help is appreciated

as i know, you can view the code, but i haven't find a way how to edit it.

just copy the flow and paste it into notepad, then you can get the code.

How do you view the code? That might seem like a dumb question but I've tried googling and exploring the PAD tool and there doesn't appear to be a way to do it.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Top Kudoed Authors
Users online (3,205)