I'm coding an A.I. in Visual Basic and when it when it doesn't know something the user inputted, it'll send the user's input into a Google form and submit it automatically in the background if they opted in.
However, I've been struggling to get this to work for many hours now, because whenever I attempt to reference the button in Visual Basic, I receive a null exception.
I've tried to reference the button by its class, but apparently I still run into a null exception error. I have verified that the webBrowser control is navigating the page before attempting to find the button. I expected there to be no errors and for the form to be submitted successfully.
wbFeedback.Navigate("https://docs.google.com/forms/d/e/. . . . . ./viewform?usp=pp_url&entry.1619369433=" + tbInput.Text.Replace(" ", "%20"))
tbInput
is a text box that the user input's their question into for processing.
Here's the submit button's code:
<div role="button" class="uArJ5e UQuaGc Y5sE8d VkkpIf NqnGTe M9Bg4d" jscontroller="VXdfxd" jsaction="click:cOuCgd; mousedown:UX7yZ; mouseup:lbsD7e; mouseenter:tfO1Yc; mouseleave:JywGue;touchstart:p6p2H; touchmove:FwuNnf; touchend:yfqBxc(preventMouseEvents=true|preventDefault=true); touchcancel:JMtRjd;focus:AHmuwe; blur:O22p3e; contextmenu:mg9Pef;" jsshadow="" jsname="M2UYVd" tabindex="0">
<div class="Fvio9d MbhUzd" jsname="ksKsZd"></div>
<div class="e19J0b CeoRYc"></div>
<span jsslot="" class="l4V7wb Fxmcue">
<span class="NPEfkd RveJvd snByac">Submit</span>
</span>
</div>