Jump to content

Saving data from a Google Chrome page


Recommended Posts

I'm working on a script to open a series of webpages, extract and save certain information, then output that information.  To do this, I open the webpage, send a control+a, send a control+c, then paste the webpage to notepad and use StringRegExp to find the relevant data.  

The problem I am having is that the information on certain webpages loads in a chart, which loads after the webpage has loaded, thus using ShellExecuteWait or WinWait doesn't make the program wait until the information I want is actually there and so when I copy the webpage the important information isn't copied.  My solution at this point is just to Sleep(1000), which usually gives enough time for the entire page to load, however occasionally there is not enough time and I cannot be certain of the internet speeds everywhere this program is to be used.

I have searched the forums/web and found a few potentially helpful solutions with Internet Explorer, however I would much rather use Google Chrome. Is there a way to wait for all/certain parts of a Google Chrome webpage to respond before continuing the code? Or should I just admit defeat and recode for use with Internet Explorer? Or is there a better way all together to accomplish this with Google Chrome?

Any and all help or advice is appreciated.

Link to comment
Share on other sites

I don't think there is a Chrome UDF >available.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Thank you both for the advice.  Ultimately, I believe I have solved the problem by not closing the webpage after the copy and paste, and if the StringRegExp returns no values I have the program return to the chrome page and recopy.  That process is repeated until StringRegExp returns values.

If anybody has a more eloquent or efficient solution please post it, I always want to improve the code of course.  Thanks again.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...