VBA: navigating IE, problem in logging in

Nelson78

Well-known Member
Joined
Sep 11, 2017
Messages
526
Office Version
  1. 2007
Hello everybody.

For one specific site, I've problem in logging in.

When the macro runs, the id is correctly written in its field, the same for the password, but clikking the button the operation fails with the following alert as if nothing had written:


All fields are mandatory


Code:
IE.document.getElementsByTagName("INPUT")(0).Value = myId     

IE.document.getElementsByTagName("INPUT")(1).Value = mypassword

IE.document.getElementsByTagName("button")(0).Click

Any idea?
 
Last edited:

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Hello everybody.

For one specific site, I've problem in logging in.

When the macro runs, the id is correctly written in its field, the same for the password, but clikking the button the operation fails with the following alert as if nothing had written:


All fields are mandatory


Code:
IE.document.getElementsByTagName("INPUT")(0).Value = myId     

IE.document.getElementsByTagName("INPUT")(1).Value = mypassword

IE.document.getElementsByTagName("button")(0).Click

Any idea?



No way (and no errors are signalled).
 
Last edited:
Upvote 0
May be some validation code running in the page capturing at events?

When I type manually, inspecting I can see

Code:
class="y-textbox"

transforming in

Code:
class="y-textbox y-textbox-focus"
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top