As the title says i am trying to click this button...
Pic (The save one)
on this webpage...
http://upload.youtube.com/my_videos_upload?restrict=html_form
I have been trying various permutatuons of this
Dim j As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("BUTTON")
For Each elem As HtmlElement In i
elem.InvokeMember("click")
Next
With little luck, i also tried to find the element bytagname of Class and it couldnt find it...
My whole code (for this procedure) is here.
End Sub
Private Sub ButtonX3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonX3.Click
Dim f As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("input")
For Each elem As HtmlElement In f
If elem.GetAttribute("name") = "title" Then
elem.SetAttribute("value", txtTitle.Text)
End If
If elem.GetAttribute("name") = "keywords" Then
elem.SetAttribute("value", txtKeyWords.Text)
End If
Next
Dim i As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("textarea")
For Each elem As HtmlElement In i
If elem.GetAttribute("name") = "description" Then
elem.SetAttribute("value", txtDescription.Text)
End If
Next
Dim value As Integer
Dim h As HtmlElementCollection
Dim g As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("select")
For Each elem As HtmlElement In g
h = elem.Children
Next
For Each elem As HtmlElement In h
If ComboBoxEx1.SelectedText = elem.InnerText Then
value = elem.GetAttribute("value")
End If
Next
For Each elem As HtmlElement In g
elem.SetAttribute("value", value)
Next
Dim j As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("BUTTON")
For Each elem As HtmlElement In i
elem.InvokeMember("click")
Next
End Sub