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
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

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