Hi,
I am having a webtest issue with some javascript that has been added to
a webpage that produces the error:
[clickButton] DEBUG (com.canoo.webtest.steps.Step) - Handling exception
com.gargoylesoftware.htmlunit.ScriptException: ReferenceError:
"O_CommentMove" is not defined. (JavaScriptStringJob#1)
The error is inconsistent and sometimes happens on different methods.
I have been experimenting with the webtest script to see what is
happening and it seems that if I delay a little (5 seconds) between
navigating to the page that includes the offending javascript and
clicking a link to move to another page, I do not get the error anymore.
Seems to be a timing issue where perhaps the javascript has not been
fully loaded, when I do a <clickLink>
Here is snippet of code that works:
<clickLink description="Navigate to Customer Service screen"
label="Customer Service" />
<verifyTitle text="${fiorg} Banking : Customer Service Index" />
<sleep seconds="5" />
<clickLink description="Navigate to Customize Your Account"
label="Customize your accounts" />
If I comment out the <sleep> the webtest fails on the clickLink with the
error described.
FYI - the javascript code above execution starts from a call to the O_Go
method from a call just before the close of the html body:
<script LANGUAGE="JavaScript1.2"
type="text/javascript">O_Go('../onlineopinion/');</script>
</body>
Thanks
Mark Winney
_____________
The information contained in this message is proprietary and/or confidential.
If you are not the intended recipient, please: (i) delete the message and all
copies; (ii) do not disclose, distribute or use the message in any manner; and
(iii) notify the sender immediately. In addition, please be aware that any
message addressed to our domain is subject to archiving and review by persons
other than the intended recipient. Thank you.
_____________