Actually I am doing something like:
var txt_divDutiable = '';
txt_divDutiable += 'dutiable';
that was the reason I got an error with text " evaluates to: , expected
value is: gaga"
but now
<verifyXPath xpath="//[EMAIL PROTECTED] = 'divDutiable']/text()"
text=".*dutiable*."
regex="true"/>
does not work also.
Cheers
Florian
-----Original Message-----
From: Florian Felgenhauer (DHL CZ)
Sent: Wednesday, June 14, 2006 5:48 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [Webtest] innerHTML undefined
Hi Marc,
I tried it with the "verifyXPath step.
The javascript function is called in two different ways:
1. With a script at the end of the page
<div id="divNotDutiable" class="inputrow">gaga</div>
<script type="text/javascript">
var txt_divNotDutiable = 'not dutiable';
</script>
<div id="divDutiable"></div>
<script type="text/javascript">
var txt_divDutiable = 'dutiable';
<c:choose>
<c:when test="${doCash.dutiable}">
displayDutiable(true);
displayNonDutiable(false);
</c:when>
<c:otherwise>
displayDutiable(false);
displayNonDutiable(true);
</c:otherwise>
</c:choose>
</script>
2. By some ajax request
But both does not change the text of the div, because the "verifyXPath"
step evaluates an empty string.
Am I still working on the DOM that was returned by the server. What do I
have to do to work on the changed DOM?
Cheers
Florian
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Marc Guillemot
Sent: Wednesday, June 14, 2006 3:58 PM
To: [EMAIL PROTECTED]
Subject: Re: [Webtest] innerHTML undefined
Hi Florian,
your scriptStep works on htmlunit's DOM. innerHTML is not a property of
a
DOM node but of an associated host host object. It is possible to access
the
associated host object (have a look at htmlunit's API) and therefore to
call
the jsx_GetInnerHTML() method, but I'm not sure that it makes really
sense.
In your case I would rather write a test like:
<verifyXPath xpath=""//[EMAIL PROTECTED] = 'divDutiable']/text()" text="gaga"/>
Marc.
--
View this message in context:
http://www.nabble.com/innerHTML-undefined-t1786010.html#a4865333
Sent from the WebTest forum at Nabble.com.
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest