0

I have a very simple issue and I'm looking for a simple way to do that. In fact, I'm searching to auto-fill a Web-Form from an official webPage of an institution and I would like to do it in Javascript into a webpage which will do it automatically on client-side.

I tried CasperJS/PhantomJS which is very useful to do that but they have to be run by command line and not by a js script.

This webForm is very simple.It has several dropdownList, checkboxes and text input with a simple submit button.

I don't need some detailed code but just the way/tools to achieve that. I'm on it since 2 weeks without any good results.

7
  • Is this web form on someone else's website or your own? Commented Jan 7, 2014 at 15:39
  • It sounds like you're describing XSS. Think of the horrible security implications if what you are attempting were possible. Commented Jan 7, 2014 at 15:40
  • Provide some context, are you automating a repetitive task or just want to fill out forms quickly? Commented Jan 7, 2014 at 15:41
  • Is it just for you, or is it for others? Is it one time only, or multiple times? Is it the same data all the time, or does the data change? Commented Jan 7, 2014 at 15:43
  • Hi, Thanks for support. This form is not my Own this is Link Page : NavCanada. It's send by POST Method. It's for automating a repetitive Task with data change. It's for automating a human filling each months who have to do it 20 or 30 times eachTime. Commented Jan 7, 2014 at 18:15

2 Answers 2

1

Ideally, this should be done server to server. What you want is a web service. This way you don't have to have a client machine with a browser sitting open to handle this.

A quicker and dirtier method would be to submit the form data directly to the 3rd party web server via cURL:

https://superuser.com/questions/149329/what-is-the-curl-command-line-syntax-to-do-a-post-request

http://curl.haxx.se/docs/httpscripting.html

Sign up to request clarification or add additional context in comments.

1 Comment

Thks, I will try and be back.
0

The best way to do that is using Selenium. Use Selenium and you can easily fill out forms of third party.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.