views:

488

answers:

3

I am looking for a solution to fill web forms from flash or javascript. The "filling" should be done non-visually. The "filling" should be initiated from user computer, because I need to access local network resource.

Just by looking at Selenium and iMacros I can tell that creating player that is smart enough is a pretty big project. I also do not want to build "recorder" part at all, so I am looking for a solution that can use some standard macros (Selenium or iMacros, or something else)

Ideally I would want a "flash player" or "javascript player" that could play iOpus iMacros script or Selenium Script.

Expected behavior

  • User opens my website
  • User clicks button in my website
  • In the background (on user's PC) some script opens another website (local website), fills few edits and presses "OK" button.

Is that possible? Are there any existing libraries that could help?

A: 

You can access form elements through document.forms[i], but allowing a website to do that to another website would be a big security hole. (Imagine: You open veryfunnyvideos.com, it opens Gmail in background and does things.)

grawity
+1  A: 

I think JavaScript's Same Source restriction prevents this (if I understand you correctly). Basically JavaScript is not allowed to access any server other than the one that hosted its content. This is primarily to prevent access to content inside firewalls (i.e. a computer inside a firewall connects to some site hosted outside the firewall with some script on it- if JavaSCript could access different sites from the host machine, the site's server could gain access to information behind the firewall).

I'm not sure how Flash handles things but I would be surprised if the same restriction did not exist.

dball917
A: 

I think the closest you will get with this is the iOpus iMacros Firefox plug-in [http://www.iopus.com/imacros/firefox/], and allowing your users to download/share/activate a macro via that plug-in. (See demo video @ above link).

Someone feel free to edit/add links if there is an equivalent Internet Explorer / other plug-in.

anonymous coward