Jump to content

Help clicking a button in IE


Recommended Posts

https://rmplusportal.rightmove.co.uk/

On that page is a login form requiring username, password and then the clicking of the button (or pressing enter but I'm not a fan of using Send)

Here's the section of code from the page that specifically deals with the form...

<form>
  <div class="error-message-login" data-test="error-message"></div>
  <label>
    <span>User email</span>
    <div class="ui input">
      <input id="email" type="text" placeholder="Your email">
    </div>
  </label>
  <label>
    <span>Password</span>
    <div class="ui input">
      <input id="password" type="password" placeholder="Password">
    </div>
  </label>
  <button class="ui primary button" role="button" data-test="login">Login</button>
  <p>
    <a class="forgot-your-password" href="https://www.rightmove.co.uk/forgottenPasswordForm.html">Forgot your password?</a>
  </p>
</form>

Specifically the <button class...></button> is causing me problems as I can't find a way to click it. The 'User email' and 'Password' objects have an 'id' so I can reference these in the AutoIT code and interact with them and the button also previously had the id of 'login' but I guess in a change to this page that was altered.

Oddly, if I get the code to show the instance of IE that is created and manually click Login or press Enter the page gives me an error saying 'Please enter your email address' even though it is there. I have to manually go into each field and make a change i.e. adding a character to the end of each field then deleting it before it will let me in by either clicking Login or pressing enter. So maybe there's so code elsewhere on the page that knows the fields haven't been physically typed in?

Any help on this would be much appreciated.

Edited by Dent
Link to comment
Share on other sites

50 minutes ago, Dent said:

Specifically the <button class...></button> is causing me problems as I can't find a way to click it

You should be able to retrieve the button element using _IETagNameGetCollection. Then you could try using _IEAction to click it.

51 minutes ago, Dent said:

Oddly, if I get the code to show the instance of IE that is created and manually click Login or press Enter the page gives me an error saying 'Please enter your email address' even though it is there. I have to manually go into each field and make a change i.e. adding a character to the end of each field then deleting it before it will let me in by either clicking Login or pressing enter

Looks like the site uses the React Javascript library, which can lead to the issues you're encountering. Search the forum to some possible solutions.

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

×
×
  • Create New...