Click here to Skip to main content
15,936,709 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I think it would be best if i went in to more detail about what i have so far and what i want to achieve,

i work for an insurance company and sometimes we recieve an email from websites i.e Gocompare, Confused, CompareTheMarket saying we havent quoted for how ever many hours or minutes, then we open a web browser navigate to the relevant website and re-run a previous quote to clear the alarm, this is time consuming not by a great deal i know but i would like to just press one button and all of that happens so i can carry on with what im doing,

So far i have a windows form application with 4 buttons referencing different websites, and behind each button i want to be able to navigate to the relevant site and re-run previous quotes insted of manually going to the site and and entering the login details, and then clicking the "next" button to navigate through the pages until finally coming to the end to view quotes etc,

I dont want anything to pop up i just want a button to be pressed and thats it, the Webbrowser1 i have changed to the properties so it doesnt show,

if you need to have a better look in to this then please go to click home insurance, retrieve saved quotes, and on the screen you will see on the right the edit quote button, thats what im trying to press. the login details are password testtest

my code so far below navigates to the site and logs in, im then stuck on clicking the "EditQuote" image :-( im actually pulling my hair out at moment as i have searched and searched and i cant seem to find any examples :-( hopefully some one can help me with this...

Public Class Form1

  Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  End Sub
  Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted

    Dim theelementcollection As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("Input")
    Dim count As Integer = 0
    For Each curelement As HtmlElement In theelementcollection
      If curelement.GetAttribute("Name").Equals("email") Then
        curelement.SetAttribute("Value", "")
      ElseIf curelement.GetAttribute("Name").Equals("password") Then
        curelement.SetAttribute("Value", "PASSWORD")
      ElseIf curelement.GetAttribute("Value").Equals("") Then
      End If
    count += 1
    If count = 1 Then
    End If


  End Sub
End Class

if someone can help me get passed this part i would really appreciate it, this is on a windows form application.

Hope to hear from someone soon.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900