Help: imacro stalls at dropdown box

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
dombrorj
Posts: 16
Joined: Thu Jan 28, 2010 4:38 am

Help: imacro stalls at dropdown box

Post by dombrorj » Sat Feb 06, 2010 9:15 pm

The following macro should got to the specified site -> login (or ignore if fails because already logged in) -> click the 2nd "edit" button -> change the value -> click "save"

It works sometimes. Other times it clicks the "edit" button, and then just hangs. Eventually timing out. I can't figure out why or a workaround for this.

When you click the edit button, it opens a drop down box. The imacro always opens the drop down box successfully, but that's where it just waits. It's as if the imacro doesn't realize the drop down box has opened and won't move on to the next command. Oddly, it works some times and moves on to make the selection and then save (as instructed).

It seems to work more often (but not always) when I'm not already logged in to the site, and always fails when I am already logged in. I suspect is has something to do with that.

Here's the code (for FireFox). Do you see anything wrong or something I can add?

Thanks!

Code: Select all

VERSION BUILD=6500125 RECORDER=FX
SET !ERRORIGNORE YES
TAB T=1
URL GOTO=http://www.mysite.com
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:login_form ATTR=ID:login
TAG POS=2 TYPE=A ATTR=TXT:edit
TAG POS=1 TYPE=SELECT ATTR=* CONTENT=%1
TAG POS=2 TYPE=INPUT:BUTTON ATTR=VALUE:Save
Daniel, Tech Support
Posts: 1483
Joined: Tue Jan 26, 2010 11:35 am

Re: Help: imacro stalls at dropdown box

Post by Daniel, Tech Support » Mon Feb 08, 2010 6:09 pm

Hello,

The content of the website may change slightly after login. This may cause the macro to fail.
In any case, I would suggest that you delete this line:

Code: Select all

SET !ERRORIGNORE YES
So that the macro fails on an error. In that case iMacros will show you the line where it failed and an error message.
If it doesn't help you to solve the issue, please post that line number and error message here.

Best regards,
Daniel, iOpus Support
dombrorj
Posts: 16
Joined: Thu Jan 28, 2010 4:38 am

Re: Help: imacro stalls at dropdown box

Post by dombrorj » Mon Feb 08, 2010 6:37 pm

Thanks for the help.

I added that line because if I'm already logged in, the login submit form and button doesn't exist. So it's intended to let the process continue if the login fails.

When I remove that line, the process works fine if I am not logged in to the site. If I am already logged in, however, it fails at line 5:
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:login_form ATTR=ID:login
Daniel, Tech Support
Posts: 1483
Joined: Tue Jan 26, 2010 11:35 am

Re: Help: imacro stalls at dropdown box

Post by Daniel, Tech Support » Tue Feb 09, 2010 1:17 pm

dombrorj wrote:I added that line because if I'm already logged in, the login submit form and button doesn't exist. So it's intended to let the process continue if the login fails.
Well, that logic is correct. I just wanted you to take it off for testing.
dombrorj wrote:If I am already logged in, however, it fails at line 5:
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:login_form ATTR=ID:login
That's natural.
dombrorj wrote:When I remove that line, the process works fine if I am not logged in to the site.
Does that mean you're not having the issues you had previously? At all?

Now, will it also always work when you are logged in, if you remove

Code: Select all

TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:login_form ATTR=ID:login
?
Daniel, iOpus Support
dombrorj
Posts: 16
Joined: Thu Jan 28, 2010 4:38 am

Re: Help: imacro stalls at dropdown box

Post by dombrorj » Tue Feb 09, 2010 3:35 pm

Hi Daniel,

Thanks for the help. If I remove:

Code: Select all

TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:login_form ATTR=ID:login
it does appear to be working if I am already logged in. At least during the instances that I tested. But of course it doesn't work if I am not logged in to the site.

To answer your other question, yes, I'm still having trouble when using the line of code above and already logged in. Seems to work fine if I'm not logged in. I can't to get the script to ignore if already logged in and continue to work.

I'm setting this up as a Scheduled Task in Windows to run at 3a.m., and I'm afraid that there will be times I forgot to logout at the end of the day in order for the imacro to work.

Oh, and I when I set:

Code: Select all

SET !ERRORIGNORE NO
I get: "RuntimeError: element INPUT specified by ID:login was not found, line: 5"

Thanks again for any suggestions you may have.
Daniel, Tech Support
Posts: 1483
Joined: Tue Jan 26, 2010 11:35 am

Re: Help: imacro stalls at dropdown box

Post by Daniel, Tech Support » Tue Feb 09, 2010 6:33 pm

Hello,

This is a bit unusual. It works without the "login line" when you are logged in. It works with the "login line" when you are not logged in.
So basically coming to your initial code should do the trick. Could you try that now? May be that was somekind of a temporary/caching issue?

Actually could you try putting

Code: Select all

SET !ERRORIGNORE YES
Just before the login line and a

Code: Select all

SET !ERRORIGNORE NO
right after it? In that case it will only tolerate an error on trying to login when you're already logged in, but it will still fail on any other error and will give you an error message.

Hope this helps!
Daniel, iOpus Support
dombrorj
Posts: 16
Joined: Thu Jan 28, 2010 4:38 am

Re: Help: imacro stalls at dropdown box

Post by dombrorj » Tue Feb 09, 2010 9:33 pm

Yeah, it's very strange. logically, it seems it should work just fine. I tried what you mentioned above, and made sure to clear browser cache. Still experiencing the same thing. It just hangs at:

Code: Select all

TAG POS=2 TYPE=A ATTR=TXT:edit
It opens the drop down box, but that's it... eventually timing out.

I guess I'll just have to be sure to log out everyday in order to get this to work. For the life of me, I can't figure out why it's behaving this way.

I appreciate the help. If you can think of anything else, do share. Thanks!
Daniel, Tech Support
Posts: 1483
Joined: Tue Jan 26, 2010 11:35 am

Re: Help: imacro stalls at dropdown box

Post by Daniel, Tech Support » Wed Feb 10, 2010 1:01 pm

Hello,

Another question: have you tried playing with !TIMEOUT and ! LOADCHEK values?

Best regards,
Daniel, iOpus Support
Post Reply