Jump to content

Recommended Posts

Posted

At this site http://tennisinsight.com/ there is a Login button at the top, how do I click this? I can set the fields for username and password but everything I've tried to click Login does not work.

I don't really want to have to do a pixelsearch and move the mouse to click the button.

Posted

depends which browser you are using, you can use ff, chrome, ie udf .

ill get to that... i still need to learn and understand a lot of codes graduated.gif

Correct answer, learn to walk before you take on that marathon.

Posted
#include <IE.au3>

Global $link = 'http://tennisinsight.com'


Local $oIE = _IECreate($link)

$tags = $oIE.document.GetElementsByTagName("button")

For $tag in $tags
$class_value = $tag.GetAttribute("class")
If string($class_value) = "btn btn-info" Then

    $oCorrectObj = $tag
    If $oCorrectObj.parentElement.parentElement.parentElement.GetAttribute("class") == "pull-right user-module visible-sm visible-xs  " Then
    $oCorrectObj.click()
    EndIf
EndIf
Next

 

Posted

Hi everyone,

Thanks for all responding so quickly - Muhammad I shall try your example in a moment, I don't think I'd ever have worked that out, thank-you!

Sorry 232showtime I did put ie as a tag but should have been more explicit.

AutoBert - yes I did, I had something similar to what Muhammad has posted that was failing and I had tried FormSubmit but it wasn't recognising the form object.

Just when I think I'm getting competent with AutoIt something that should be simple comes and stumps me! Such is life.

Posted

Ok so the solution from Muhammad didn't directly work, but it revealed that the site is based on WordPress (I should have noticed this from the source) so it took me to the WP login page which fortunately was easier to interact with.

Thank-you all!

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
×
×
  • Create New...