Jump to content
Sign in to follow this  
jdickens

clicking links on asp web page

Recommended Posts

jdickens

I'm not sure this is an AutoIt question.

I'm trying to get publicly available data through an .aspx web page.

http://www.investinginbonds.com/MarketAtAGlance.asp?catid=32

You fill in a couple selections and hit continue.

So far so good. I can automate that part.

Then the page I want pops up with no address bar.

I can get the first page of data there.

To access the other pages of data (if there are any), I must click on 2, 3, etc.

There is no next button (sneaky b*st*rds)

I can see (in IE) that the command executed on the link would be:

java script:__doPostBack('MuniTrades$_ctl1$_ctl1','')

or

java script:__doPostBack('MuniTrades$_ctl1$_ctl2','')

etc.

Could I

1) simulate mouse click on the consistant position of the links

2) send the javascript command itself

3) some other way

I am not experienced in this topic.

J


If I am too verbose, just say so. You don't need to run on and on.

Share this post


Link to post
Share on other sites
SlimShady

2) send the javascript command itself

That is possible. What you need to do is:

1. Use ControlSetText() to replace the current address bar content with for instance:

java script:__doPostBack('MuniTrades$_ctl1$_ctl1','')

2. Use ControlSend() to send an enter to the address bar

The above should work.

Share this post


Link to post
Share on other sites
jdickens

Yes, that does work. Very nice. Thank you.

J


If I am too verbose, just say so. You don't need to run on and on.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.