System taking getelementbyid value but it allow to login if we click at that box
I wanted to log in web page "https://www.connect2nse.com/MemberPortal/home.jsp" but site takes keyboard input values only
Dim ie As Object
Set ie = CreateObject("InternetExplorer.Application")
ie.navigate "https://www.connect2nse.com/MemberPortal/home.jsp"
While ie.readyState <> 4: DoEvents: Wend
ie.Visible = True
ie.document.getElementById("user_id").Value = "1234ABC"
ie.document.getElementById("member_code").Value = "1234"
ie.document.getElementById("password").Value = "5678"
Dim VAL As String
VAL = InputBox("Enter Captcha Value", "CAPTCHA", "")
If VAL = "" Then
End
End If
ie.document.getElementById("loginCap").Value = (VAL)
ie.document.getElementById("ext-gen39").Click
System enables Submit button if UserID, Member Code, Password and Captcha entered using keyboard or click on that box by mouse
How to do it by VBA
You need to focus on the element first
May I suggest you safely exit your code by using
rather than your current
If
statement which usesEnd
.Also, use a proper page load wait with