MushroomKing
Registered User.
- Local time
- Today, 02:48
- Joined
- Jun 7, 2018
- Messages
- 100
Hey guys!
I tried looking for an answer but to no avail. I hit a wall every time. Maybe someone can help?
I'm trying to "click" on an element with VBscript on a website.
This works. However, first i want to check if the element exists with a loop. This would work, if not for the "Invalid use of null" error i get with the code below.
Also, if i use
It tells me an "object is required!"
Could someone help me with this maybe?
I tried looking for an answer but to no avail. I hit a wall every time. Maybe someone can help?
I'm trying to "click" on an element with VBscript on a website.
This works. However, first i want to check if the element exists with a loop. This would work, if not for the "Invalid use of null" error i get with the code below.
Code:
Set IE = WScript.CreateObject("InternetExplorer.Application", "IE_")
IE.Navigate "url"
With IE.Document
Do
if not CreateObject(.getElementByID("formButton2343255")) is nothing then
.getElementByID("formButton2343255").Click()
Exit Do
End if
WScript.Sleep 500
Loop
SET objWshShell = Nothing
End With
End Function
Also, if i use
Code:
If Not .getElementByID("formButton2343255") Is Nothing Then
It tells me an "object is required!"
Could someone help me with this maybe?