Support Portal

for ProcessRobot and WinAutomation

Start a new topic

Web-based iframe containing internal HTML and CSS - Need to interact & extract data

First of all, this is extremely time sensitive. 


I have a website that has a series of news articles that are contained within an iframe and identified by HTML and CSS. I cannot get a java script to extract the elements of the iframe's contents. 


My goal is to extract the content and display it in a Selector Message Box for me to chose an article to go to. Basically, I need to import all element's "Headline" text and then an actionable "Click Link" to navigate to the article so it can be processed through text to speech program. 


I cannot give access to the website because it is corporate private stuff. 


iframes are so ridiculously difficult to work with in automation but doing so is essential to web-based RPA. I am at a 100% loss and this is very important I accomplish. 


Any help would be appreciated



====================================================================

A little data on the content inspection and code:


First iframe:

 

<iframe id="main" webkitallowfullscreen="" mozallowfullscreen="" name="main" frameborder="0" width="100%" height="1474" scrolling="no" src="/XXXX/html/blank.html"></iframe>

 

document.querySelector('#main')

 #document

  <html>

   <head>

    <title>

 

.......

 

 

 

Second iframe - Could contain hidden data:

 

 

<iframe id="parentcheckframe" name="parentcheckframe" frameborder="0" width="0" height="0"></iframe>

#document

  <html>

   <head>

    <title><title>

====================================================================


The code I am using returns no results:


function ExecuteScript()

{

    var iframe = document.querySelector('#content-main');

        //your code here

return document.querySelector('#content-main');

}

1 Comment

ADMIN

Hello,


As far as I can tell, the ExecuteScript() function is not actually called, you have simply declared a function.

Instead, you should update the action:


function ExecuteScript()

{

    var iframe = document.querySelector('#content-main');      //this is the declaration of the function

    return document.querySelector('#content-main');

}



ExecuteScript();   //<-- this is were the function is actually called




Login or Signup to post a comment