Here is the test case: (loginPage) is a property set to the main page: 
http://<someserver>:8080/pentaho/Login )
-------------------------------------------------------
<?xml version="1.0"?>

<!DOCTYPE project SYSTEM "../dtd/Project.dtd">

<project default="test">

    <import file="../definitions.xml"/>

    <target name="test" depends="wt.defineMacros">

        <webtest name="Get to Main Page">
            <invoke url="${loginPage}"/>
            <verifyTitle text="Pentaho User Console - Login"
description="verify title page"/>

            <clickElement xpath="//[EMAIL PROTECTED]'btn_login_title']"
description="click the login button" />            
            <verifyText text="Sample User:" description="verify login
pop-up" />
            
            <setSelectField description="Enter Username" xpath="//select"
value="Joe (admin)" />
            <clickButton label="Login" description="click Login button"/>
            <verifyTitle text="Pentaho User Console" description="verify
main page" />
        </webtest>

    </target>
</project>



Terry Jennings wrote:
> 
> [resending to see if there is a problem with the mailing list.]
> 
> I've just started using webtest and this may be a simple error on my part.
> 
> I have searched the forum and found other posts about this issue, but no
> answer.
> 
> I am trying to create a webtest for an application I don't own.  It looks
> to be a GWT application based on tags in the page.  There is a
> javascript-based button (table with tr/td and onClick()) that I click with
> <clickElement>.  Webtest traces say that "[clickElement]  INFO
> (com.canoo.webtest.engine.WebClientContext) - Content of window changed
> with javascript, it will NOT become current response".
> 
> Using firebug in a browser, I see a login "Window" pop up that is actually
> a new div that has been added to the DOM.  In firebug, I can see class
> names, text, etc.  In webtest, I cannot locate these elements using xpath.
> 
> The login window contains username and password fields I need to populate,
> then click on a login button.  
> 
> The webtest report succeeds on the clickElement, but fails to find the new
> DOM items for instance, using <verifyText>.  The result page on the failed
> step has the original response, not the marked-up from Javascript
> response.
> 
> Can anyone help?
> thanks,
> Terry
> 

-- 
View this message in context: 
http://www.nabble.com/Javascript-adding-%3Cdiv%3E-s-to-page-tp20257006p20306166.html
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