• Log in or sign up for an account here: https://www.sythe.org/login

Clicking buttons on HTML

Cody

Grand Master
Joined
May 10, 2005
Sythe Gold
30
Messages
3,052
Age
36
Location
USA, Oregon
Clicking buttons on HTML
Anyone know how to click buttons on a website

Standard HTML button..

It has to find the button then click it not use xy..
 
Clicking buttons on HTML
Using the webbrowser control you can use:
Code:
WebBrowser1.Document.All("submitBtn").Click

Some are iffy and require
Code:
WebBrowser1.Document.All("submitBtn").Submit

Replace "submitBtn" with the Name of the button you wish to click
 
Clicking buttons on HTML
If you don't want to have to change it based on the name of the submit button this has worked for me. I found it somewhere so I don't take credit for writing it.
Code:
For j = 0 To WebBrowser1.Document.Forms(0).length - 1
  
  If WebBrowser1.Document.Forms(0)(j).Type = "submit" Then
    WebBrowser1.Document.Forms(0)(j).Click
    Accounts = Accounts + 1
  End If
Next j
 
Runescape Gamblingrunescape gambling
Back
Top