Hi,

 

  I am trying to test the login of my portal using webtest. It's just a
simple check for username and password but don't

know why it displays error. I'm using the scripts as given in user guide
(using the same webTest.xml. ) The script for login page test  is

as follows:

 

allTests.xml

 

<?xml version="1.0"?>

 

<project name="WebTestDemo-allTests" default="test">

                <target name="test" description="runs all the tests">

                                <ant antfile="googleWebTest.xml"/>

                </target>

</project>

 

 

I've used the same name "googleWebTest.xml" as given in user guide.  And
googleWebTest.xml is as follows:

 

googleWebTest.xml

 

<?xml version="1.0"?>

 

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

 

<project name="demo.googleWebTest" default="test">

 

                <target name="test">

 

                                <webtest name="Optrak Home page test">

                         <invoke url="http://www.mylogin.com"/>

          <setInputField name="_58_login" value=""/>

          <setInputField name="_58_login" value="aaaaa"/>

          <setInputField description="Set password field _58_password:
1234" name="_58_password" value="1234"/>

          <clickButton label="Sign In"/>

                                </webtest>

 

                </target>

</project>

 

When I test it, the test report showed that the test has failed and the
error I have got is  as follows

 

Error 

Message

JavaScript error loading page http://www.mylogin.com: 404
/html/js/portlet/messaging.js for
http://www.mylogin.com/html/js/portlet/messaging.js

Location

C:\Canoo WebTest\Lift\tests\googleWebTest.xml (line: 10)

Details

javascript error 404 /html/js/portlet/messaging.js for
http://www.mylogin.com/html/js/portlet/messaging.js

 

 

line         -1

 

 

javascript source              

 

 

failing line            <no source>

 

 

javascript call stack          404 /html/js/portlet/messaging.js for
http://www.mylogin.com/html/js/portlet/messaging.js

 

When I looked at the resulting page, it showed the page with a different
username on default. The username is not getting overwritten. I also
tried giving username and password (actual username and password not
given here) directly in invoke, it dint help. One more thing is that the
base URL is www.mylogin.com . when I enter, it gets redirected to a
different URL- www.mylogin.com/web/guest/home. I also tried with this
URL, but it displays the same error.

 

Can anyone help me with this plz?

 

Thanks

-Jai

Reply via email to