Jump to content

Click on button


 Share

Recommended Posts

Hello

I want to click on the button "Abandonner la modification"; there's no form in the code.

Could you help me, please ?

Thanks

<input type="button" value="Abandonner la modification" onclick="if(isLinkNotClicked()){if (!prepareAnnuler('')){setLinkClickedFalse();return false;} else{return true;}} else {return false};" onmouseover="this.className='buttonOver';showmessage(gsInfoBulleAnnulerModificationEC, null, true);" onmouseout="this.className='button';hideticker();" class="button"/>

Link to comment
Share on other sites

i got this error message :

$o_object.Click()

$o_object.Click()^ ERROR

There's no form

and for

Local $oInputs = _IETagNameGetCollection($oIE1, "input")

For $oInput In $oInputs

MsgBox(0, "Form Input Type", "Form: " & $oInput.form.name & " Type: " & $oInput.type)

Next

Variable must be of type "Object".:

MsgBox(0, "Form Input Type", "Form: " & $oInput.form.name & " Type: " & $oInput.type)

MsgBox(0, "Form Input Type", "Form: " & $oInput.form^ ERROR

Edited by emanemos
Link to comment
Share on other sites

An answer is above by ileandros...why are you appending .form on the end of the input?

I would add one last error check prior to the click:

Local $idctrl
Local $oInputs = _IETagNameGetCollection($oIE, "input")
for $oInput in $oInputs
if $oInput.type = "button" And $oInput.value = "Abandonner la modification" Then $idctrl = $oInputs
Next
If IsObj($idctrl) Then
_IEAction($idctrl, "click")
Else
msgbox(1,1,"unable to find input")
 
endif

edit...i swear, the 'smart' auto editing on this forum messes me up more often than it helps

Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

The problem was on _IEAttach : 2 windows with the same variable $sCellValue ...

Thanks

$oIE = _IEAttach($sCellValue, "text")

WinSetState ( "", "", @SW_MAXIMIZE )

$oInputs = _IETagNameGetCollection($oIE, "input")

For $oInput In $oInputs

If $oInput.value == "Abandonner la modification" Then _IEAction($oInput, "click")

Next

Edited by emanemos
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...