Javascript Button

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 Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.
Post Reply
ebdavison
Posts: 2
Joined: Mon Jan 19, 2009 10:27 pm

Javascript Button

Post by ebdavison » Mon Jan 19, 2009 10:33 pm

I have a form that I am trying to fill out with iMacros for Firefox. Works find all the way until it gets to the submit button. The button is actually an image that has a javascript script attached to it. The Javascript does the submit action and there is otherwise no Submit form element in the form. I can record the macro and my actions submit the form but when the script is played back the "button" is clicked but no javascript is executed so the form is not submitted.

How do I get the form to submit with iMacros?
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Re: Javascript Button

Post by Tech Support » Tue Jan 20, 2009 10:48 pm

Please try if a DirectScreen click on the button works: http://wiki.imacros.net/DirectScreen_Technology
AndreasKuhn
Posts: 35
Joined: Thu Aug 21, 2008 10:26 am

Re: Javascript Button

Post by AndreasKuhn » Wed Jan 21, 2009 9:07 am

This solution does only work with IE or iMacro-Browser but not with Firefox.
Neither does "Imageclick". Both is not yet supported by Firefox.

As far as I tried on "click x= y= " is accepted in Firefox but "click x= y=" is not "strong enough" to start the javascript.
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Re: Javascript Button

Post by Tech Support » Wed Jan 21, 2009 3:45 pm

Thanks for the feedback: Can you please post the URL of the web page and/or the macro that creates the problem? This would allow us to quickly re-create the issue on our test systems.
AndreasKuhn
Posts: 35
Joined: Thu Aug 21, 2008 10:26 am

Re: Javascript Button

Post by AndreasKuhn » Wed Jan 21, 2009 4:19 pm

To reproduce you can use your own script shown in the wiki http://wiki.imacros.net/DirectScreen_Technology.
-> "Entering Text" or the calculator example that is not deployed with newer iMacro versions anymore.

Whithin your draft you use "ds cmd=moveto..." ; "ds cmd=ldown..." ... but you can also use "ds cmd=click ..."

Even this does not work in Firefox.
ebdavison
Posts: 2
Joined: Mon Jan 19, 2009 10:27 pm

Re: Javascript Button

Post by ebdavison » Wed Jan 21, 2009 4:23 pm

I get the following when I try to use the DS command:

UnsupportedCommand: command DS is not supported in the current version, line 12

The version in my script from the recorder is:

VERSION BUILD=6111213 RECORDER=FX

Do I need a newer version?
justdan23
Posts: 2
Joined: Thu Apr 02, 2009 5:44 am

Re: Javascript Button

Post by justdan23 » Thu Apr 02, 2009 6:32 am

I'm currently using iMacros for Firefox 6.2.1.4 and I'm seeing the same problem.

The online documentation says 'WINCLICK' was replaced with 'DS' internally to use the 'DirectScreen Technology'.
However, the 'Click Mode' Options only list three options:
1. Select the best click mode automatically
2. Use complete HTM tag
3. Use X/Y position


The online documentation ( http://wiki.imacros.net/DS ) says version 6 has additional options for 'DirectScreen' and shows pictures of what dialog should show ( http://wiki.imacros.net/Image:Select_click_mode_DS.png ). However, this is not the same dialog appearing from the Firefox Add-on for version 6.2.1.4. :shock:

Q: Could the XPI contain the wrong binary files for version 6.2.1.4 for Windows?
=Dan=
Marcia, Tech Support
Posts: 1087
Joined: Thu Jan 29, 2009 1:10 pm

Re: Javascript Button

Post by Marcia, Tech Support » Thu Apr 02, 2009 1:31 pm

Hello,

I am sorry. Direct Screen is not supported in the freeware iMacros Addons. Neither Firefox, nor Internet Explorer, as one can see in this table.

The little icons in the Direct Screen page also hint that iMacros Addon for Firefox does not support DS.

If you have one of the Business Editions, then you can use either iMacros Browser or Internet Explorer to handle your DS commands.

I hope to have clarified the issue.
Regards,

Marcia
LucasJacks
Posts: 2
Joined: Thu Aug 23, 2007 7:01 am
Location: London
Contact:

Another Javascript problem

Post by LucasJacks » Tue Aug 04, 2009 12:17 pm

Hi

I have a slightly similar problem completing a form containing javascript.

I have a joomla-based website and am trying to get the system to email username reminders to all users by entering their email addresses one at a time into the lost username form. (Obviously I've checked that I can't do this in joomla admin.)

When I record the process for a single username the script looks like this:
VERSION BUILD=6240709 RECORDER=FX
TAB T=1
URL GOTO=http://billgoodyear.org/index.php/compo ... stpassword
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:adminForm ATTR=ID:boxLostUsername CONTENT=YES
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:adminForm ATTR=ID:checkemail CONTENT=me1@myemailaddress.co.uk
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:adminForm ATTR=ID:cbsendnewuspass

I create a longer script with multiple email addresses in (and leaving out the first two lines for subsequent iterations) using VBA rather than trying to get iMacros to look up the email addresses in my spreadsheet.

When I play it back it fails because the submit button is not clicked. Basically the page doesn't seem to recognise that the email address has been entered. I can tell that because when I type it in by hand the label on the submit button changes to 'Send Username' as soon as I start to enter the email address (because a piece of javascript runs) but when it is entered by the macro, the label remains as 'Send Username/Password' (presumably because the javascript doesn't run).

I also have the freeware Firefox addon but am hoping that the solution to my problem might be different!

Thanks for your help.
Post Reply