• 0

Point to elements in webBrowser


Question

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");

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.