• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Need to automate logging in website

 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I am new to this and need help here. Sorry if it sounds like asking homework to be done, but this is not the case.

We have a website where we perform the following steps daily, I am looking for a way to automate this.

1) open the url like www.abcd.com
2) login using my employee id and password (I guess I will need to read it from a file while automating).
3) a page opens and we need to enter a numeric value in a table.

Any help will be highly appreciated.

Regards
Prashant
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are at many possibilities. Two Java-centric ones: if the web site doesn't use redirects and the forms are fairly simple, you could juse use HttpURLConnection and code things up in Java directly. If the site's behavior is more complex, then a Web testing tool like HttpUnit is your best bet, because it provides routines to do the things that are complicated to do yourself.
 
author
Posts: 288
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Although the java.net package provides basic functionality for accessing resources via HTTP, it doesn't provide the full flexibility or functionality needed by many applications. The Jakarta Commons HttpClient component seeks to fill this void by providing an efficient, up-to-date, and feature-rich package implementing the client side of the most recent HTTP standards and recommendations.

http://jakarta.apache.org/commons/httpclient/

If it a simple request use HttpURLConnection class:


sample code:

 
Mahesh Bhatt
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks guys,

That helps.

Regards
Prashant
 
reply
    Bookmark Topic Watch Topic
  • New Topic