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

Reply via email to