Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Script to fill browser form

I have little business problem, I need to make a script to fill (not send) out browser forms(only simple textfields, checkboxes and drop downboxes).

I need to launch multiple windows with the same form with different data to speed up form filling

  1. What kind of scripting/programming do I need to use to fulfill these needs(Batch, JS .. ) ?
  2. I have knowledge only of java, and basic html,c,c++ ... so if I can get basic tutorials I would be grateful indeed.

I have bits of ideas of how this is possible - through IDs of various field on the page which I can access to edit their values, so I just need language specific tutorials/suggestions.

Batch would be preferable if possible, because i need to execute the script through a java swing program.

P.S : If this is of any relevance, only browser acceptable is IE

like image 253
Arjun Avatar asked Nov 19 '12 16:11

Arjun


1 Answers

dont think its possible through Batch,

I think easiest would be javaScript for this task. (chill js is pretty easy)

You can write a simple javaScript to fill in form You should find how to fill form through javaScript helpful

Then you can use ScriptEngineManager to execute javaScript from your java code.

This tutorial should be helpful :execute javascript from java

like image 76
Mukul Goel Avatar answered Oct 01 '22 01:10

Mukul Goel