Jump to content
Sign in to follow this  

How to click all links in a web page,

Recommended Posts

Hi there,

I have to click some links in a web page. There are links like this;


I want to click all links start with www.somesite.com/some.php

the number "99999" is the user id's so they are changing every time. How can i click all links without consider about user id'S

(of course there are a lots of links in same page i want to select links only start with www.somesite.com/some.php)

I know a little about ie actions and ie.udf but i don't know how to find this specific links...

Thank you all :blink:

Share this post

Link to post
Share on other sites

Did you try searching the help file? There is very similar example in _IELinkGetCollection function reference. Just parse the link href with string functions

Edited by 871

Share this post

Link to post
Share on other sites

I think your code wasn't working (but i can be mistaken :blink:)

BUT simply this worked when i edited your code;

#include <IE.au3> 
$oIE = _IECreate("http://www.somesite.com/")
$oLinks = _IELinkGetCollection($oIE) 
For $oLink In   $oLinks     
$findlink = StringInStr($oLink.href, "http://www.somesite.com/some.php")    
If $findlink = 0 Then       
Else    _IEAction($oLink, "click")  

Thank you very much for your help!

I will give your credits if i will be able to finish my script ;):)

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...