Hi,

if the text you want to verify doesn't contain markup, you can use for
instance
<verifyXPath xpath="contains(string(.), 'your text')"/>

I open a new thread to discuss verifyText & AJAX.

Cheers,
Marc.


Andrew Sickorsky wrote:
> 
> Hello, Mark!
> 
> About "no text":
> After clicking the button in real browser new string appears on the page 
> in the table with tex, say, '17 Oct 2007'
> After "clicking" using <clickButton> no such text found (though it 
> should be presented in the page in the table cell), but when i look into 
> the groovy-printed result I found string needed.
> 
> Is there any way to verify such text without groovy-scripting 
> (unfortunately i'm unfamiliar with Groovy)
> 
> Thanks
> Andrew
> 
> 
>> Hi Andrew,
>>
>> what do you mean with "there is no text in clickButton result page"?
>>
>> verifyText works on the rough text of the last response page from server.
>> If
>> the page content has been changed dynamically (for instance after
>> XMLHttpRequest usage), it won't be seen!
>>
>> In other words, verifyText works on 
>> step.context.currentResponse.webResponse.contentAsString
>> and NOT on
>> step.context.currentResponse.asXml()
>>
>> Cheers,
>> Marc.
>>
>>
>> Andrew Sickorsky wrote:
>>   
>>> Hello all!
>>>
>>> I faced with AJAX problem: for some reason page doesn't updated after 
>>> XmlHttpRequest performed (Prototype library was used; ideally some text 
>>> should appear, but nothing happens). Env: last build of HtmlUnit, 
>>> Webtest R1619, ant 1.6.5 were used. Tested with IE and FF user agents.
>>>
>>> Steps:
>>>  - open page (<invoke>
>>>  - fill in form and submit (<setInputField> + <clickButton> + <groovy>
>>> print currentResponce)
>>>  - verify that page text changes (it should! - <verifyText>)
>>>
>>> Interesting point: there is no text in clickButton result page though it
>>> is in the groovy printed current responce though verfiyText finds
>>> nothing.
>>>
>>> Thanks in advance
>>> Andrew
>>>
>>>
>>>
>>> begin:vcard
>>> fn:Andrew Sickorsky
>>> n:Sickorsky;Andrew
>>> org:texunatech
>>> adr;dom:;;Magistralnaya street, 5 - 33;Moscow
>>> email;internet:[EMAIL PROTECTED]
>>> title:Tester
>>> tel;work:+7 495 9809067
>>> tel;cell:+7 909 9070328
>>> x-mozilla-html:TRUE
>>> url:www.texunatech.com
>>> version:2.1
>>> end:vcard
>>>
>>>
>>>
>>>     
>>
>>   
> 
> 
> begin:vcard
> fn:Andrew Sickorsky
> n:Sickorsky;Andrew
> org:texunatech
> adr;dom:;;Magistralnaya street, 5 - 33;Moscow
> email;internet:[EMAIL PROTECTED]
> title:Tester
> tel;work:+7 495 9809067
> tel;cell:+7 909 9070328
> x-mozilla-html:TRUE
> url:www.texunatech.com
> version:2.1
> end:vcard
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-Fwd%3A-XmlHttpRequest%3A-page-text-doesn%27t-change-after-ajax-call-though-it-should.--tf4675543.html#a13363076
Sent from the WebTest mailing list archive at Nabble.com.

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to