Jump to content

How to automate button click in IE


ur
 Share

Recommended Posts

For the below form, I am able to automate using below code for textboxes.

1.JPG

#include <IE.au3>

Local $oIE = _IEAttach("http://localhost:18170/MartAdmin/", "url")
_IELoadWait($oIE)

$Search = _IEGetObjById($oIE,"x-auto-16-input")
_IEPropertySet($Search, 'innerText','Uday KIran')

$Search = _IEGetObjById($oIE,"x-auto-18-input")
_IEPropertySet($Search, 'innerText','Uday KIran')

But for the Login button, there is no id or name.

The html code when I click on Inspect element in browser, shown below.

<button tabindex="0" class="x-btn-text" style="width: 64px; position: relative;" type="button">Log In</button>

Please let me know how to click this.?

 

Link to comment
Share on other sites

when I click on view source, I am getting only below code

 

<!doctype html>
<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">

    <link type="text/css" rel="stylesheet" href="gxt/css/gxt-all.css" />
    <link type="text/css" rel="stylesheet" href="css/ca-all.css" />
    <link type="text/css" rel="stylesheet" href="MartAdminConsole.css">   
     
    <title>erwin Mart Administrator</title>    
   
  </head>

  <body>

    <iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
    
    <div id="loading"> 
        <img src="gxt/images/default/shared/large-loading.gif"  
        width=" 32" height=" 32 " />Loading...<br />
    </div>
    
     <script type="text/javascript" language="javascript" src="MartAdminConsole/MartAdminConsole.nocache.js"></script>
  </body>
</html>

with inspect element I am getting below.

Capture.JPG

 

_IETagNameGetCollection giving empty value with table tag.

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...