Jump to content

IE.au3 Click submit button without name or id ?


sgn209
 Share

Go to solution Solved by karlkar,

Recommended Posts

Actually you don't have to click it. You can just call this function from onClick.

$oIe.document.parentWindow.eval("handlePlaceOrder()")

 

I got this error when try it:

C:\Users\Dat\Desktop\WORK\DAT - POST.au3 (399) : ==> The requested action with this object has failed.:
$OIE.document.parentWindow.eval("handlePlaceOrder()")
$OIE.document.parentWindow.eval("handlePlaceOrder()")^ ERROR
->03:05:32 AutoIt3.exe ended.rc:1
>Exit code: 1    Time: 23.228
Link to comment
Share on other sites

  • Solution

Are you using ie 10?

Try

$links = $oIe.document.getElementsByClassName("btn-yellow bby-submitPlaceOrder")

For $link In $links

$link.click()

Next

You can of course change this loop if you know which occureance of this link you want to click to

$links.item(x).click()

Link to comment
Share on other sites

Are you using ie 10?

Try

$links = $oIe.document.getElementsByClassName("btn-yellow bby-submitPlaceOrder")

For $link In $links

$link.click()

Next

You can of course change this loop if you know which occureance of this link you want to click to

$links.item(x).click()

 

This one working perfectly ! Thank you very very much ! You are a hero save my life !

2 more question, i dont know why all of my script CAN'T RUN on Windows Server 2008 with IE 11 ?  Where I can find documents to about $oIe.document."something" ?

Thanks again and have a great day !

Link to comment
Share on other sites

I am trying to do the same thing, press a button on a web page using autoit.  The line of code  describing the button I am trying to press is shown below:

<TR><TD colspan=6 align=center><br><input type="button" value="Copy Your Computer's Time Settings" onclick="CopyTimeFromPC();"></TD></tr>

The web page has HTML and embedded javascript.  I can see the onclick javascript subroutine in the web page source code.  I just don't know how to activate it.

All the ieau3 functions seem to need a name or class, this has neither.

Any ideas?

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