I am attempting to select a radial button on a webpage through webbrowser using
however I keep getting object reference null and I cannot figure out why. The only thing I can figure is maybe the website isn't loaded when it does this, and if so, how can I tell it to load the page before it occurs? I already have another one using
to tell me when the page is loaded so it can press a button, and i've tried doing it again but it will not allow it. I've also tried using a goto statement but it will not recognize it in another sub.
I'm stuck, can anyone assist me?
Basically i'm trying to load a webpage, check if it's loaded, press a button, check if it's loaded, select a radial option, see if it's loaded, and then input more data.
Code
Dim checkB As HtmlElement
checkB = WebBrowser1.Document.GetElementById("offerListInput_-1595316507")
checkB.SetAttribute("checked", True)however I keep getting object reference null and I cannot figure out why. The only thing I can figure is maybe the website isn't loaded when it does this, and if so, how can I tell it to load the page before it occurs? I already have another one using
Code
Public Sub WebBrowser1_DocumentCompleted(ByVal sender As Object, ByVal e As WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompletedto tell me when the page is loaded so it can press a button, and i've tried doing it again but it will not allow it. I've also tried using a goto statement but it will not recognize it in another sub.
I'm stuck, can anyone assist me?
Basically i'm trying to load a webpage, check if it's loaded, press a button, check if it's loaded, select a radial option, see if it's loaded, and then input more data.


