Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Help on Invoking Click Event
I am currently doing a project that involves automated logging-in on web accounts. I used the webBrowser control for this purpose and so far everything is working fine.
However, the method I use is: webBrowser1.Document.GetElementById("btnSubmitURL").InvokeMember("click");
The problem comes in when the button elements do not have name or id properties. Is there a way to invoke the click event without knowing the name or id of the button element?
The only other method I know is GetElementFromPoint(), but it would be good if there is another way since this method requires knowledge on the coordinates of the button.