Sign in to follow this  
Followers 0
reap123

Point to elements in webBrowser

2 posts in this topic

Hi,

 

VS2017    C#.NET

I have a loop that runs during a certain time-span every day. Every five minutes, this loop opens google.com in a webBrowser. Here I wish for it to automatically search for "sp500 chart" and read the current daily percentage change in value. This value is then converted for later use. I believe this is the line I should be looking at in my browser's element list: <span class="fac-cc">17.67 (0.76%)</span>, and I could use GetElementById/InnerText to address it.

 

Although most solutions I've seen online look simple enough, I cannot seem to understand how to point to the search box on google.com and insert a predetermined text. This is as far as I ever get:

 

while ((now > start) && (now < end))
                {
                    webBrowser1.Navigate("google.com");

 

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

  • Recently Browsing   0 members

    No registered users viewing this page.