With the Classic Agent, you can use InvokeJava to access methods for testing JavaScript objects, if these objects reside on a Web page that contains an applet.
With the Open Agent, you can use ExecuteJavaScript to test anything that uses JavaScript.