Click here to Skip to main content
11,805,604 members (61,944 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: VB VB.NET
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 Frown | :-( im actually pulling my hair out at moment as i have searched and searched and i cant seem to find any examples Frown | :-( 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.

Posted 28-Oct-10 1:52am

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

  Print Answers RSS
0 OriginalGriff 3,265
1 Maciej Los 1,990
2 KrunalRohit 1,907
3 CPallini 1,855
4 Richard MacCutchan 1,227

Advertise | Privacy | Mobile
Web02 | 2.8.151002.1 | Last Updated 28 Oct 2010
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100