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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Top Solution Authors
Top Kudoed Authors
Users online (3,113)