Sign in to follow this  
Followers 0
Hakdaddy

Saving data from a Google Chrome page

4 posts in this topic

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.

Share this post


Link to post
Share on other sites



There is also an UDF for FireFox:

Share this post


Link to post
Share on other sites

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


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
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.

Share this post


Link to post
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
Sign in to follow this  
Followers 0