Answers to Frequently Asked Questions

Does the Jiffie Plug-in really control IE?

Yes, the Jiffie plug-in controls IE. You can even watch it as it executes.

Does the Jiffie Plug-in support X feature?

In order to really work well with a plug-in you should be familiar with both the plug-in's features and the actual library the plug-in was written against. In this case, the plug-in was written around Jiffie. Just because the plug-in doesn't have native support for the feature you are looking for, doesn't mean that you can't accomplish it by using the library directly.

To find out what the plug-in offers, it's best to look at the javadocs.

Does the Jiffie Plug-in support JavaScript?

Yes, whatever JavaScript executes in IE will execute using the Jiffie plug-in.

How does the JavaScript functionality work in Jiffie?

The way things seem to work is that when a JavaScript method is called instead of a direct URL request, then the JavaScript is executed in a separate thread, causing the test to continue even though the request has not been officially made yet. That's where the functionDelay comes in. It forces a wait that has to be long enough for the JavaScript to actually make a request that will then be caught by the Jiffie event handler.

Sometimes the JavaScript events don't get called when actions occur on them. In the case where they don't get executed, you can simply call them in your custom tag or in by using the various action tags that come with Jiffie.

You'll find an example of calling a JavaScript event here.

When using the provided action tags that extend IEFireEventTag, JavaScript events can be called by setting the 'eventToFire' attribute to describe which event to fire.

Why does my script fail saying it's on the previous, but the snapshot shows the expected page?

From our experience, we have found that if the page has JavaScript in it and that JavaScript is called, then we need to give IE some time before we do our next step. This can be accomplished by using the functionDelay attribute in any function tag. This works by waiting for n milliseconds after the tag has been executed.

When I set beginSession to true, nothing happens. I just get a stack trace. What am I doing wrong?

Jiffie requires jacob.dll to be in the system path. Usually, this is the problem. For example, if jacob.dll is in your lib directory, then try setting PATH=%PATH%;lib and then try it again.

I am having problems with the XPath functionality. What should I do?

The XPath functionality of Jiffie is beta-quality. If you are experiencing problems, upgrading to Java 1.5 may resolve them.

If you are simply having trouble creating an XPath expression, we have found that even if the HTML tags are lowercase, the XPath must be in uppercase. For example an expression for the following page: <html><body>some text</body></html>, would look like: /HTML/BODY and not /html/body.

Sometimes a passing script fails because of a What can I do?

We are finding there may be several causes for this:

  1. This can happen when using an older version of IE. We use IE 6 and we don't get this exception.
  2. Sometimes opening an instance of IE before running any scripts can solve this and even speed up the execution slightly.
  3. Adding a delay to your script by either setting functionDelay or by calling the delay function in your custom tags has been known to help

If none of the above help, please post a question to the forums.

When I attempt to run a script through the GUI, I get a stack trace

If your script does not conform to valid XML standards, the script cannot be parsed and executed. If your script contains invalid XML, Jameleon will display a new window containing the stack trace of the error.

One way to ensure that your script is valid before executing it is to click on the script name within the GUI and ensure that the test case documentation is generated. If no test cases are generated, you will need to debug your script.

Why does assertTextNotPresent or assertTextPresent not find the text on the page?

Internet Explorer trims some of the quotes in the HTML source. For example, id="some id">some text might get returned as id=some id>some text