Hello Iain_10
I had the identical problem seeing an empty rectangle within the grid
where the content normally appeared. It is possible to test ExtJS
grids with WebTest and I solved that in the following way:
// example: searching an organization in a separate
search field
// set the search field, the results are displayed in a
extjs grid
ant.setInputField description: "set [id=searchFilter] =
Ypsilan",
xpath:'//inp...@id=\'searchFilter\']',
value: "Ypsilan"
// exectute the javascript function which loads the
content of the grid
def page= step.context.currentResponse
ScriptResult result= page.executeJavaScript("loadGrids();")
// ... yes, it may take time, adjust the period to your
needs
ant.sleep description: "sleep 20", seconds: "20"
// the XPath in the grid is best retrieved with Firefox'
DOM Inspector:
//
//d...@id='ext-gen33']/d...@id='ext-gen34']/div[1]/table/tbody/tr/td[3]/div/a
verifyXPath description: "see Ypsilantis Oliven Import
GmbH",
xpath:
"//d...@id=\'ext-gen34\']/div[1]/table/tbody/tr/td[3]/div/a",
text: "Ypsilantis Oliven Import GmbH"
bye, wildi
On 12/21/2010 12:59 PM, Iain_10 wrote:
>
> Hi,
>
> Just to add some more.
>
> In the WebTest logs I get the following being output:
>
> Obsolete content type encountered: 'text/javascript'.
> Content of window changed to about:blank (text/html)
> Content of frame window has changed without javascript while enclosing page
> is loading, it will NOT become current response
>
> Could these be causing some of the problems I'm having?
>
> thanks!
>
>
> Iain_10 wrote:
>> Hi,
>>
>> I am trying to test a web page written in ext js with WebTest.
>>
>> Is it possible to use WebTest to test ext js code?
>>
>> My tests runs but fails when it cannot verify Text that is supposed
>> to appear on the page. When I check the "Resulting page" I just
>> get an empty rectangle with no info where the ext js page is supposed
>> to appear.
>> Any suggestions as to why this might be happening?
>>
>> thanks,
>> /Iain...
>>
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest