• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to invoke a javascript on a remote application ?  RSS feed

 
Schandha Ravi
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

In our project we are using Commons HttpClient API to connect to a HTTP site, navigate through each of the pages and submitting forms and we were successful to some extent in navigating to few pages, where ACTION url is a straight hard coded value (from view source). But at some point, we got stuck as the ACTION url is determined by a javascript using some parameters. I wonder, if it is possible to invoke the javascript which is residing on the remote site library, by passing on the parameters "mimicing" the browser and thus obtain the URL. Am I too ambituous and ambiguous ?
 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
 
Schandha Ravi
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tim.

It seems there is no ready made solution available for my problem.
 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well, they do say that

If the JS is not too involved, then using HttpUnit, HtmlUnit or jWebUnit (all can be found on SourceForge) instead of HttpClient might do the trick. Although they are meant for testing web apps, they can be used for the automation of all kinds of web app accesses. Of course, they don't implement all the HTTP features that HttpClient does, so if that's what you need you may be out of luck.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!