Jump to content

'Click' in IE which uses javascript


Recommended Posts

I need to perform a mouse click on a table row in Internet Explorer. When a row is clicked in this table, javascript is used to submit the form. The table grows dynamically depending on the number of rows returned, and I would need to click a specific row depending on the contents of the <TD>.

Is this possible or does anyone know of any example scripts that do this?

(Any help would be greatly appreciated as I am completely stuck until I solve this!!)

Link to comment
Share on other sites

I need to perform a mouse click on a table row in Internet Explorer. When a row is clicked in this table, javascript is used to submit the form. The table grows dynamically depending on the number of rows returned, and I would need to click a specific row depending on the contents of the <TD>.

Is this possible or does anyone know of any example scripts that do this?

(Any help would be greatly appreciated as I am completely stuck until I solve this!!)

You could use :

MouseClick("button", x, y)oÝ÷ ÚÚºÚ"µÍÒQPXÝ[Û ÌÍÛ×ÛØXÝ ][ÝØÛXÚÉ][ÝÊ

i am not too familiar with IE.au3 but in the help file in _IEaction it says the following:

This technique of submitting forms is useful because many forms rely on Javascript
code and "onclick" events on their submit button making _IEFormSubmit()not perform as expected
Edited by c4nm7
Link to comment
Share on other sites

I need to perform a mouse click on a table row in Internet Explorer. When a row is clicked in this table, javascript is used to submit the form. The table grows dynamically depending on the number of rows returned, and I would need to click a specific row depending on the contents of the <TD>.

Is this possible or does anyone know of any example scripts that do this?

(Any help would be greatly appreciated as I am completely stuck until I solve this!!)

Borin, It appears to me that you want to parse the table?? Check out the IE.au3 UDF in the help file. It has lots of functions to expand your brain :). MouseClick () will work, its just the fact that you need to get the position of the table row :) Hope this can aid you in your journey getting your program completed...
Link to comment
Share on other sites

Thanks very much for the replies folks. For anyone looking to do this, I was able to do it like this...

$oTable = _IETableGetCollection ($oIE, 0)

If IsObj($oTable) Then

$TRows = $oTable.rows

For $TRow In $TRows

If IsObj($TRow) Then

$TData = $TRow.GetElementsByTagName ("td")

If $TDatum = "xxxxxxx" THEN

$TDatum.click

EndIf

EndIf

Next

EndIf

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