Page 1 of 1

Help: imacro stalls at dropdown box

Posted: Sat Feb 06, 2010 9:15 pm
by dombrorj
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

Re: Help: imacro stalls at dropdown box

Posted: Mon Feb 08, 2010 6:09 pm
by Daniel, Tech Support
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,

Re: Help: imacro stalls at dropdown box

Posted: Mon Feb 08, 2010 6:37 pm
by dombrorj
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

Re: Help: imacro stalls at dropdown box

Posted: Tue Feb 09, 2010 1:17 pm
by Daniel, Tech Support
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
?

Re: Help: imacro stalls at dropdown box

Posted: Tue Feb 09, 2010 3:35 pm
by dombrorj
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.

Re: Help: imacro stalls at dropdown box

Posted: Tue Feb 09, 2010 6:33 pm
by Daniel, Tech Support
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!

Re: Help: imacro stalls at dropdown box

Posted: Tue Feb 09, 2010 9:33 pm
by dombrorj
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!

Re: Help: imacro stalls at dropdown box

Posted: Wed Feb 10, 2010 1:01 pm
by Daniel, Tech Support
Hello,

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

Best regards,