ONDIALOG with confirmation dialog

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
Airmanbzh
Posts: 12
Joined: Wed May 23, 2012 2:20 pm

ONDIALOG with confirmation dialog

Post by Airmanbzh » Wed May 23, 2012 2:31 pm

Hello,
I create a script to enter data into a form. At the end, the form ask me to confirm with the "confirm" javascript function.

I define this command

Code: Select all

ONDIALOG POS=1 BUTTON=YES CONTENT=OK
to passe the confirmation box but it doesn't click on OK. I only see a quick grey flash on screen (the confirmation box wich is open and close very quickly) and I'm still on the same form. When I do I by myself (the confirmation) the form is submit.

There is my code :

Code: Select all

SET !REPLAYSPEED FAST
SET !TIMEOUT_MACRO 70
SET !TIMEOUT_PAGE 60
SET !TIMEOUT_STEP 10
SET !ERRORIGNORE NO
ONDIALOG POS=1 BUTTON=YES CONTENT=OK
'----------------------------------------------------------------------------------------------------------


'----------------------------------------------------------------------------------------------------------
' VALIDATION / URL GOTO
'----------------------------------------------------------------------------------------------------------
URL GOTO={{URL}}
'----------------------------------------------------------------------------------------------------------


'----------------------------------------------------------------------------------------------------------
' CRITERES
'----------------------------------------------------------------------------------------------------------
SET !TIMEOUT_STEP 1
' Page title
TAG POS=1 TYPE=TITLE ATTR=TXT:* EXTRACT=TXT
'----------------------------------------------------------------------------------------------------------


'----------------------------------------------------------------------------------------------------------
' ACTIONS
'----------------------------------------------------------------------------------------------------------
FRAME F=1
'ID
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:form1 ATTR=NAME:"form1:_id21" CONTENT={{ID}}

'LASTNAME
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:form1 ATTR=NAME:"form1:_id27" CONTENT={{LASTNAME}}

'FIRSTNAME
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:form1 ATTR=NAME:"form1:_id33" CONTENT={{FIRSTNAME}}

'BIRTHDAY
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:form1 ATTR=ID:"form1:dateNaissance" CONTENT={{BIRTHDAY}}

'MAIL
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:form1 ATTR=NAME:"form1:_id44" CONTENT={{MAIL}}

'ADDRESS
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:form1 ATTR=NAME:"form1:_id50" CONTENT={{ADDRESS}}

'ZIP
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:form1 ATTR=ID:"form1:champ_CP" CONTENT={{ZIP}}

'CITY
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:form1 ATTR=ID:"form1:champ_ville" CONTENT={{CITY}}

'SUBMIT
TAG POS=1 TYPE=A ATTR=ID:form1:demandeExistante
WAIT SECONDS=2
'----------------------------------------------------------------------------------------------------------
I try some commands :
ONDIALOG POS=1 BUTTON=YES CONTENT=OK
ONDIALOG POS=1 BUTTON=OK CONTENT=OK
ONDIALOG POS=1 BUTTON=YES CONTENT=
ONDIALOG POS=1 BUTTON=OK CONTENT=
I'm doing something wrong or it's a "bug" ?

Thanks for any help
Airmanbzh
Posts: 12
Joined: Wed May 23, 2012 2:20 pm

Re: ONDIALOG with confirmation dialog

Post by Airmanbzh » Wed May 23, 2012 3:07 pm

I find a first solution

"ONDIALOG" doesn't work fine on Firefox12. I try the same code on FF8 and it works.
Post Reply