[Webtest] [webtest][JIRA] Created: (WT-440) Per WT-375 - When using Ajaxy components to generate a new page, VerifyText doesn't produce the current response

Suzanne Scheitle (JIRA) Suzanne Scheitle (JIRA)" <noreply@canoo.com
Wed, 18 Jun 2008 18:52:31 +0200 (CEST)


Per WT-375 - When using Ajaxy components to generate a new page, VerifyText doesn't produce the current response
----------------------------------------------------------------------------------------------------------------

         Key: WT-440
         URL: http://webtest-community.canoo.com/jira/browse/WT-440
     Project: WebTest
        Type: Bug

    Versions: 2.6    
 Environment: XP Pro
    Reporter: Suzanne Scheitle
 Attachments: ClickableElement.txt, VerifyText.txt, richfacesTest.xml

When using  WebTest  against the attached xml (richfacesTest.xml, which you can run against the ajax demo site - it is very similar what I'm testing), I cannot get the current page to load without both attached patches, ClickableElement and VerifyText.

In VerifyText's isExpectedStringPresent(), I have to force the current page retrieval and use that:
HtmlPage p = (HtmlPage)context.getCurrentResponse().getEnclosingWindow().getEnclosedPage();

instead of using:
text = context.getCurrentResponse().getWebResponse().getContentAsString();

p.s. In ClickableElement's click() method, I have to do the same, force a getEnclosedPage()

This probably isn't the most elegant solution but it's the only way I can test our ajax components, by using both the above patches.  We'd love to see a solution incorporated into current code.  Thanks for all the great work!

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://webtest-community.canoo.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira