Hack Forums
[.NET] Clicking button in webbrowser - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] Clicking button in webbrowser (/showthread.php?tid=5638649)



Clicking button in webbrowser - Johan Cruyff - Jun 3, 2017

Hey
Usually this is very easy to do, however, this one seems to be very hard to click.

I tried tons of ways I found on google but none of them worked.

This is the source code of the page

Code
<input name="buyCommand" id="buyCommand" type="hidden" value="buy">
                      <div class="loginRequired">
                        <div class="cta">
                          <button class="theButton" type="submit">Buy</button>
                        </div>
                      </div>


I just dont get the button to get clicked...

Does someone have any clue?


* - +Haze - Jun 3, 2017

select the button using the class property of a mixture of properties and then invoke a click.


* - Ninja - Jun 4, 2017

Loop over the elements and check if the attributes match the attribute of the buy button and then invoke a click. Don't forget to break the loop.


* - Johan Cruyff - Jun 9, 2017

Somehow I cant find the right elementid, can someone help me?