[Webtest] Webtest and AJAX

av8r av8r <harman.birdi@gmail.com>
Tue, 9 Sep 2008 16:25:02 -0700 (PDT)


I am having problems with the webtest and ajax. We are using XMLHttpRequest
responses coming back as responseText. However, it does not seem to be
Everything seems to be going fine except when I get to the verifyText step.
The text
is missing, and instead the default text gets saved. Seems like the AJAX
stuff is not
working even though all the steps till the verifyText all get executed
correctly. I am
on build 1716 and using htmlunit-2.2.

<config easyajax="true"/>
       <property name="first_name" value="Eddie"/>
       <property name="last_name" value="Nettleton"/>
       <echo message="Schedule a call"/>
       <clickLink label="Calendar"/>
       <clickLink label="Schedule Call"/>
       <setInputField name="name" value="Call China office"/>
       <setSelectField name="duration_minutes" text="45"/>
       <setSelectField htmlid="parent_type" text="Case"/>
       <setSelectField htmlid="parent_type" text="Contact"/>
        <!-- Trying to figure out AJAX stuff here -->		
        <selectForm name="EditView" />
        <clickElement htmlId="parent_name"/> <!-- Focus on the textbox -->
        <sleep seconds="5"/> <!-- Wait for AJAX response -->
        <setInputField htmlId="parent_name" value="${first_name}
${last_name}"/> <-- Search & set name-->

        <clickButton description="Now click on Save" label="Save"/>
        <verifyText description="Check if page has related to stuff"
text="${first_name}> <!-- FAILS HERE -->
        <clickLink label="Logout"/>
View this message in context: http://www.nabble.com/Webtest-and-AJAX-tp19403354p19403354.html
Sent from the WebTest mailing list archive at Nabble.com.