Jump to content

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;

www.somesite.com/some.php?99999

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:

Link to comment
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       
Sleep(10)       
Else    _IEAction($oLink, "click")  
MsgBox(0,"OK","Clicked")
    EndIf
    Next

Thank you very much for your help!

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...