Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Testing and the fly likes how to  automatically run test scripts from inside a webpage Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » Testing
Bookmark "how to  automatically run test scripts from inside a webpage " Watch "how to  automatically run test scripts from inside a webpage " New topic
Author

how to automatically run test scripts from inside a webpage

enric jaen
Greenhorn

Joined: Oct 15, 2010
Posts: 25
I want to automatically emulate user actions within a webpage in a similar way that Selenium does, but running the scripts from inside a webpage, and using the browser itself (instead of creating a browser instance in some language).

Notice that I don't mean the Selenium IDE (which opens a new window in FF), but I mean running the test from inside a webpage.

Can anyone suggest the best way to do this?

Tomek Kaczanowski
author
Ranch Hand

Joined: Oct 26, 2005
Posts: 40

Hi Enric,

I can't understand what you are trying to achieve. Could you please specify what special things you want to have, that Selenium, Geb, Watir & friends can't?


Tomek Kaczanowski
Book author: Practical Unit Testing with TestNG and Mockito
http://practicalunittesting.com
enric jaen
Greenhorn

Joined: Oct 15, 2010
Posts: 25

Example: Suppose I had a web page that when I do a click automatically brings me to my Amazon bought books.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
That doesn't really make it any clearer. If you don't want a browser instance, check out the HtmlUnit and jWebUnit libraries.
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3071
    
  33

Play framework allows you to run the selenium tests from a browser, so you might want to check how its being done.


Mohamed Sanaulla | My Blog
 
GeeCON Prague 2014
 
subject: how to automatically run test scripts from inside a webpage