furrycow Posted September 7, 2008 Share Posted September 7, 2008 Hey, im needing to find all the hyperlinks on a webpage, and then to "click" on a random one of them. i say "click" because i dont want it to use the mouse say using pixelsearch or anything...nor do i want to use _IENavigate as the hyperlinks have a cache or something im not sure what the term is but it will only register if i click on the link... If i were to use _IEAction("$somevariable", "click"), would that have the exact same affect as if it were a real person clicking on one of the hyperlinks?? If so, how would i implement that to do what i said in the first line? I really hope its possible! Thanks in advance! Instant Lockerz Invite - www.instantlockerzinvite.co.uk Link to comment Share on other sites More sharing options...
junkew Posted September 7, 2008 Share Posted September 7, 2008 something like below can help $oElements = _IETagNameGetCollection ($oIE, "A") for $i=0 to $oElements.length-1 for $k=0 to $oElements($i).attributes.length-1 $tAttr=$oElements($i).attributes($k).name $tValue=$oElements($i).attributes($k).value consolewrite($tPropname & ":" & $tPropValue & ":" & $tAttr & ":" & $tValue & @crLF) next next FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now