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
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

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

Top Solution Authors
Users online (5,085)