Web Vba issue

sms2luv

New Member
Joined
Dec 23, 2010
Messages
3
Please go through this query, its quit long, but challenging
I wanted a macro to login to a intranet site using my user name and password.
I used early binding techniques and created new instance of IE.
The code enters my user name and password in appropriate fields.
However the login button did not worked.
I used sendkeys to press enter and was able to login successful.

When I login I get a option to click ATTENTION.
I need to click on it to go to this specific page. (Query string doesn't work)
Sendkeys cannot be used as there are several options and enter button selects some other options.
I inspected the element and found it under a table tag, then "a" tag and then IMG tag.
IMG tag has a href attribute and SRC also.

I looped through all the "a" and "IMG" tag but didn't get that href and SRC.(Logged in)

I logged off from the website and checked the main page button source and found that it has changed little bit, it had login and password fields and was not able to find the href and SRC(which was visible when I logged in).

In short I mean to say that the website source has changed after I login.

So the problem begins here.
When I ran the code, I was logged in successfully.
When I lopped through all "a" and IMG tag, I am getting all the tags which were used before I had logged in.
So now I want to list of all "a" and IMG after I log in to the site.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Please take a minute to read the forum rules, especially the one about cross-posting, and add links here to your other post(s) in other forums. Thanks. :)
 
Upvote 0

Forum statistics

Threads
1,216,171
Messages
6,129,281
Members
449,498
Latest member
Lee_ray

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