Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 12-24-2011, 01:14 PM   #1
LQ Newbie
Registered: Dec 2011
Posts: 1

Rep: Reputation: Disabled
Angry How can I save my time not to do the same repetitive job in a webpage to fill a form

My job is: against a Policy no I entered some data which is same for next 1000 Policy No. For ex- the buttons are

N, Y N, N Y, Y, Y, DDMMYYYY, DDMMYYYY, DDMMYYYY, Y,N,Y,N. After typing again I press either ENTER or TAB button to

complete the process.Between two policy nos, I pressed buttons 42 times in the above manner including ENTER or TAB.

I performed the job in Mozilla Firefox 4.0.0 where in the first page imacro works. But after login imacro does not

works and also right click does not works. Is there any way by which policy no came from a EXCEL spreadsheet and

other repetitive jobs will be done automatically? It will save a lot of time and relieved me from a monotonous job.
Old 12-24-2011, 04:33 PM   #2
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
You may be able to use something like wget or curl in a shell script, looping over each policy number. If the numbers are sequential and sorted, you can use a shell variable to compute the numbers, otherwise they can be generated and read from a file. It will take a little research to see what is required. Use a conventional browser, and get it to display the page source HTML, probably by right-clicking somewhere on the page. If the HTML source contains a construct that contains an HTML <form> element, you are probably in luck. Even better would be if it uses
. If it does, then you will almost certainly be able to script the solution. The form should contain the same number of elements as you are required to type in, and you may be able to identify their names (but not necessarily).
Let us know what you find.
Here is a sample of what to look for, extracted from a LQ search page:
<form action="/questions/search.php" method="post">
	<input type="hidden" name="do" value="process" />
	<input type="hidden" name="showposts" value="1" />
	<input type="hidden" name="quicksearch" value="1" />
	<input type="hidden" name="s" value="" />
The <form> tag is followed by its method type ("post", in this example), and a bunch in input elements. With luck, you should find something similar. If you need help deciphering, post a sample (definitley use [CODE][/CODE] tags), and someone should be able to assist you.

--- rod.

Last edited by theNbomr; 12-24-2011 at 04:36 PM.
Old 12-24-2011, 04:39 PM   #3
Registered: Mar 2008
Posts: 22,046

Rep: Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632
Wonder if a program like expect would work?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
HOWTO: Make a repetitive job that reminds you to change your password every month drManhattan Ubuntu 2 09-05-2010 10:55 AM
auto fill a form and submit using curl limadario Linux - Software 1 06-04-2010 05:46 AM
How connections to my wireless network go to a webpage login form? Airport/Hotel abefroman Linux - Networking 1 08-14-2009 10:04 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:45 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration