bluecat1254
New Member
- Joined
- Jul 28, 2011
- Messages
- 7
Hello, I managed to figure out how to input login information and click the submit button on a login page but I was wondering if I could have vba check internet explorer if the login page has opened (if I had previously logged in the login page should not occur). I have something akin to the code below
To elaborate, is there a command that say checks the title of the page for "account login", how would I go about this. I appreciate any help. Thank you
Code:
With objIE
.Navigate "url"
.Visible = True
If (*WHAT CAN I TEST FOR TO SEE IF PAGE IS THE LOGIN PAGE) Then
Do While .Busy: DoEvents: Loop
Do While .ReadyState <> 4: DoEvents: Loop
.document.getelementbyid("txtusername").Value = "user"
.document.getelementbyid("txtpassword").Value = "pass"
'login
.document.getelementbyid("btnlogin").Click
To elaborate, is there a command that say checks the title of the page for "account login", how would I go about this. I appreciate any help. Thank you