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

Extract Data From Webpage - iFrame

I am unable to use the 'Extract data from web page' action on a site that has an iFrame.

Previously, I was using this solution that I got from here, but it is not working for this site. 

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

If not, are there any alternatives?

 

Example:  https://www.mecojax.com/careers/

 

Copy/Paste PAD workflow:

 

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
PAG
Resolver I
Resolver I

Hello @pjwilson87 

This was challenging since the iframe is on a different domain and is therefore protected by cross-site scripting, but I finally figured out how to do it.


The main points were:
1. Open Edge DevTools and select element
2. Copy content to clipboard
3. Use regular expression to find href links (will contain name and url)

 

Complete solution here:
https://power.automate.gallery/E6yRfFcnhYwe 
Just insert the url "https://www.mecojax.com/careers/" (see line 2) and run the flow. Results are saved to match[] which should contain 60 links.

View solution in original post

2 REPLIES 2
PAG
Resolver I
Resolver I

Hello @pjwilson87 

This was challenging since the iframe is on a different domain and is therefore protected by cross-site scripting, but I finally figured out how to do it.


The main points were:
1. Open Edge DevTools and select element
2. Copy content to clipboard
3. Use regular expression to find href links (will contain name and url)

 

Complete solution here:
https://power.automate.gallery/E6yRfFcnhYwe 
Just insert the url "https://www.mecojax.com/careers/" (see line 2) and run the flow. Results are saved to match[] which should contain 60 links.

pjwilson87
Helper I
Helper I

Thank @PAG, never thought of going this route as an option. This works for me!

Helpful resources

Announcements
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.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (2,688)