Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to mimic click and javascript function

 
reubin haz
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm writing a Java program to automatically load webpages content. If need go to the next page, the action is taken from javascript using this function:



Is there any way to mimic user's click on the button and invoke Javascript function by using Java? So that I can read the content from pages to pages.

Thanks
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are testing tools that can do this kind of thing: HttpUnit and related software. Have a look at HttpUnit and let us know how you make out.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic