Problems with IMAGESEARCH and IMAGECLICK

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
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

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
im_newbie
Posts: 9
Joined: Thu Oct 20, 2005 12:46 am

Problems with IMAGESEARCH and IMAGECLICK

Post by im_newbie » Thu Oct 20, 2005 11:47 pm

In trying to work around a problem I'm having, I'm using the IMAGESEARCH and IMAGECLICK functions which is kind of working and kind of NOT WORKING.

The scenario:

I have a html page where I have an input field with a browse button to look for a file to upload.

Right below I have a Submit button which when pressed pops up a dialog box asking me if I'm sure if I want to do this (Yes/No).

So I upload the file through the WINCLICK function and enter in the filename in the form field and then proceed to push the submit button.

Then I have IMAGESEARCH look for the dialog box and compare it against a cut and paste image of the dialog box (that I made) followed with an IMAGECLICK telling it to press the Yes button on the dialog box.

It seems to sort of work in that the page kind of gets processed however the dialog box ("Asking if I'm sure I want to do this? (Yes/No)") doesn't go away.

Any thoughts on how to get rid of the dialog box in any way here?

And I'm using WINCLICK regardless because I have to upload a file and the only way to do it in InternetMacros is through WINCLICK, so I can't change that.

Thanks.
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Post by Tech Support » Fri Oct 21, 2005 1:41 pm

Jus to clarify: Is this a real message box (= outside the browser screen)? Then imageclick/search can not find the dialog box, but the regular message box handler will work.

If you have problems recording, try to add

Code: Select all

ONDIALOG POS=1 BUTTON=OK CONTENT=
manually to the macro. That should solve the problem.
im_newbie
Posts: 9
Joined: Thu Oct 20, 2005 12:46 am

Post by im_newbie » Fri Oct 21, 2005 1:53 pm

So when you ask if this is a real message box -- I'm not sure how to respond. I believe it to be a javascript dialog box (know for sure it is not a web dialog box). Also the code you are suggesting, would it work in a macro where I have used WINCLICK previously?

In another thread someone from tech support had mentioned that the TAG and WINCLICK don't work together (or that was my understanding from the reply) so would a ONDIALOG work if there was a WINCLICK before it?

Also 2 more quick questions (sorry)

1. where would I put this ONDIALOG box? in front of the imageclick that calls clicks on the submit button that generates the dialog box?

2. for the ONDIALOG syntax:

ONDIALOG POS=1 BUTTON=OK CONTENT=

where BUTTON=OK,

if I put BUTTON=YES (because the answer is yes/no and not okay/cancel) would that work or is it hardcoded to OK only for an answer

thanks if I can get around this problem I'm having I know my company would be buying this product in a second.

Thanks.
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Post by Tech Support » Sat Oct 22, 2005 8:47 am

(1) WINCLICK and the dialog manager work together with no problems. In the last post the problem was that the TAG command to trigger the dialog was not recorded correctly. That is why I recommended to switch back to the classic recording mode (that is, all other clickmode options except WINCLICK). You can always switch between all clickmode options during recording. This causes no problem.

A rule of thumb is to first try the normal clickmode options, and if they do not work for a specific click use WINCLICK. Then switch back to the normal clickmode options for the following clicks. Only very specific websites like Java- and Flash- based sites require that all the recording is done in WINCLICK or with IMAGESEARCH/IMAGECLICK.

Mike
Last edited by Tech Support on Sat Oct 22, 2005 8:55 am, edited 1 time in total.
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Post by Tech Support » Sat Oct 22, 2005 8:52 am

With regards to your two new questions:
1. where would I put this ONDIALOG box? in front of the imageclick that calls clicks on the submit button that generates the dialog box?
The ONDIALOG command can be at any position in the macro, as long as it is BEFORE the command that generates the dialog box.
2. for the ONDIALOG syntax:
ONDIALOG POS=1 BUTTON=OK CONTENT=
where BUTTON=OK, if I put BUTTON=YES (because the answer is yes/no and not okay/cancel) would that work...
Technically dialog boxes with YES/NO or OK/CANCEL are the same, just the text on the buttons is different ;) So BUTTON=OK works with a YES/NO dialog box and will press the OK button.
Post Reply