• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java code for Logging into a weburl and choosing various options in Menu bar  RSS feed

 
Kavitha shan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,

Here is my requirement: I need to login to a Web URL and navigate to the menu bar and further click on various options.

I found some codes for login. But I am not sure if navigating to menu bar is feasible in java.

Would you be able to help me in this regard, as it bit urgent?

Regards,
Kavitha
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kavitha shan wrote:Hi Everyone,

Here is my requirement: I need to login to a Web URL and navigate to the menu bar and further click on various options.

I found some codes for login. But I am not sure if navigating to menu bar is feasible in java.


What menu bar? What options?
 
Paul Clapham
Sheriff
Posts: 22701
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It helps if you stop thinking about what you see in the browser, like menu bars and so on. What you actually want to do is to send the same HTTP requests to the web application that a browser would send. Also you have to handle the responses you get from the web application in the same way that a browser would.

So that means you have to find out what requests your browser is sending, for a start. If you're using Firefox then the HttpFox plugin will help you with that, and I expect other browsers have similar tools. Then you have to write Java code which sends those requests. If you're logging in then most likely the web application will send you a cookie, which you'll have to send back with subsequent requests to maintain the session. I have seen other people suggest that HtmlUnit is a useful tool for managing this process, but I haven't used it myself.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!