RE: Pausing for Javascript to update the html

"Gary, Robert" <[email protected]>
Newsgroups gmane.comp.web.canoo.webtest
Message-ID <E70D0BC19C6CFF4C9DC7CE995F11BB083F23659D@G9W0341.americas.hpqcorp.net>
Thanks. I just tried it and I get a null pointer error (probably because I don't have a previous response). What I need is a <currentResponse> tag since the response being used is too old.
I wonder if I put a dummy button on the page and then do a click on it that would force WebTest to recognize the current response?


-Robert

From: [email protected] [mailto:[email protected]] On Behalf Of Marlon Palo
Sent: Tuesday, January 08, 2013 5:05 PM
To: [email protected]
Subject: RE: [Webtest] Pausing for Javascript to update the html

How about putting the previousResponse before the verifyText?

<previousResponse></previousResponse>

But I'm not quite sure if it will work.

Marlon
________________________________
From: [email protected]
To: [email protected]
Subject: [Webtest] Pausing for Javascript to update the html
Date: Tue, 8 Jan 2013 23:02:23 +0000
I'm testing an ExtJS application. The HTML loaded has no content other than a reference to the ExtJS Javascript code. So if I just use <invoke> to load my page its initially blank until the Javascript has a second to update it. Using sleep results in the following message...

"Content of window changed with javascript, it will NOT become current response"

However, that is exactly what I want, I want the javascript change to become the current response. How do I do that??

    <target name="wt.testInWork">
        <webtest name="my simple Test">
            <steps>
                <invoke url="http://localhost:8080/development/commonComponents/superfield/test.html"
                        description="Go to Google (in English)"/>
                <sleep seconds="30"/>
                <verifyText text="SuperField"/> <--- only available after the Javascript has a few seconds to run
            </steps>
        </webtest>
    </target>

-Robert
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.