I've got a problem:
I create a code to program which'll be filling in text in webbrowser
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If WebBrowser1.Url.ToString = "http://www.zgarnijdoladowanie.pl/gsm?cd=CD7233" Then
WebBrowser1.document.GetElementById("imie").InnerText = TextBox1.Text
WebBrowser1.document.GetElementById("plec_m").InvokeMember("click")
WebBrowser1.document.GetElementById("nazwisko").InnerText = TextBox2.Text
WebBrowser1.document.GetElementById("wiek_d").InnerText = TextBox3.Text
WebBrowser1.document.GetElementById("wiek_m").InnerText = TextBox4.Text
WebBrowser1.document.GetElementById("wiek_y").InnerText = TextBox5.Text
WebBrowser1.document.GetElementById("email").InnerText = TextBox7.Text
WebBrowser1.document.GetElementById("telephone").InnerText = TextBox8.Text
WebBrowser1.document.GetElementById("miasto").InnerText = TextBox9.Text
WebBrowser1.document.GetElementById("kod_pocztowy").InnerText = TextBox10.Text
WebBrowser1.document.GetElementById("regulamin").InvokeMember("click")
WebBrowser1.document.GetElementById("submit").InvokeMember("click")
WebBrowser1.document.GetElementById("siec")
Dim DestinationComboBox As HtmlElement = WebBrowser1.document.All.Item("siec")
DestinationComboBox.SetAttribute("selectedindex", value:=TextBox14.Text)
End If
End Sub
End Class
Now question how to replace the code if the website change like that:
http://www.zgarnijdo...l/gsm?cd=CD7233 -> http://www.zgarnijdo...l/gsm?cd=CD7234
but the id's will be still the same.
I was wondering about replace the "gsm?cd=CD7233" into "****" but it doesn't work.

New Topic/Question
Reply



MultiQuote





|