Hello,
this is my first post to this list, I hope I'm doing this correct.
We have a problem with " getting decoded twice in certain javascript code
when invoked from Webtest.
I managed to write a simple testcode that shows my problem, here is my testcode:
<html>
<body>
<a href="#" title="mytest"
onclick="javascript:document.getElementById("test").innerHTML =
document.getElementById("async").innerHTML;">do something</a>
<div id="test">
huh
</div>
<div id="async">
<a href="#" title="test2"
onclick="javascript:document.getElementById("testoutput").innerHTML =
"hello"">do something more</a>
</div>
<div id="testoutput">
</div>
</body>
</html>
When I run this webtest :
<invoke url="/test.htm"/>
<clickElement xpath="//[EMAIL PROTECTED]'mytest']"/>
The resulting page looks like this:
<html>
<head/>
<body>
<a href="#" title="mytest"
onclick="javascript:document.getElementById("test").innerHTML =
document.getElementById("async").innerHTML;">
do something
</a>
<div id="test">
<a href="#" title="test2" onclick="javascript:document.getElementById("
testoutput="">
do something more
</a>
</div>
<div id="async">
<a href="#" title="test2"
onclick="javascript:document.getElementById("testoutput").innerHTML =
"hello"">
do something more
</a>
</div>
<div id="testoutput">
</div>
</body>
</html>
As you can see the " gets decoded although it shouldn't leading to a
broken javascript code in the test-div.
When I perform the click in a regular browser the code is correct.
To check simply save the code above to a file perfom the click in a regular
browser.
Any idea what goes wrong?
Best Regards,
Peter Höpfl
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest