[Webtest] Response file seems wrong??

Ian Phillips Ian Phillips" <phillipsic@gmail.com
Fri, 5 Jan 2007 09:26:19 +0100


------=_Part_28887_1648623.1167985579064
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi.

I am trying to log into an application.  The script looks like this:

<steps>
                <invoke
                    description="get Login Page"
                    url="/" />
                <verifyTitle
                    description="we should see the login title"
                    text="KPSA" />
                <setInputField
                    description="set user name"
                    name="login"
                    value="KOPAdmin" />
                <setInputField
                    description="set password"
                    name="passwd"
                    value="passwd" />
                <clickButton
                    description="Click the submit button"
                    label=" Login "/>
                <verifyTitle text="Kabira Order Processing"
description="Kabira Order Processing follows if login ok"/>
            </steps>


The last step fails and this is the response file to the button click:
html>
 <head>
   <meta http-equiv="Refresh" content="0;URL=./index.php">
 </head><body></body></html>


In the command line I get the following:

Test step verifyTitle (C:\canoo\doc\samples\SimpleTest.xml:35: )  named
"Kabira
Order Processing follows if login ok" failed with message "Wrong document
title
found! Expected "Kabira Order Processing" but got """
        at com.canoo.webtest.ant.WebtestTask.stopBuildIfNeeded(
WebtestTask.java:
191)
        at com.canoo.webtest.ant.WebtestTask.execute(WebtestTask.java:160)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java
:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java
:1216)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets
(DefaultExe
cutor.java:40)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
        at org.apache.tools.ant.Main.runBuild(Main.java:668)
        at org.apache.tools.ant.Main.startAnt(Main.java:187)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)


I have tried setting ANT_OPTS="-DlogLevel.root=debug" in the
log4j.properties file but don't seem to get any more information.

Is there a way to find out more about what is happening?

Thanks

Ian

------=_Part_28887_1648623.1167985579064
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi.<br><br>I am trying to log into an application.&nbsp; The script looks like this:<br><br>&lt;steps&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;invoke<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; description=&quot;get Login Page&quot;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; url=&quot;/&quot; /&gt;
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;verifyTitle<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; description=&quot;we should see the login title&quot;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; text=&quot;KPSA&quot; /&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;setInputField<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; description=&quot;set user name&quot;
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; name=&quot;login&quot;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; value=&quot;KOPAdmin&quot; /&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;setInputField<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; description=&quot;set password&quot;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; name=&quot;passwd&quot;
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; value=&quot;passwd&quot; /&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;clickButton<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; description=&quot;Click the submit button&quot;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; label=&quot; Login &quot;/&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;verifyTitle text=&quot;Kabira Order Processing&quot; description=&quot;Kabira Order Processing follows if login ok&quot;/&gt;
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/steps&gt;<br><br><br>The last step fails and this is the response file to the button click:<br>html&gt;<br>&nbsp;&lt;head&gt;<br>&nbsp;&nbsp; &lt;meta http-equiv=&quot;Refresh&quot; content=&quot;0;URL=./index.php&quot;&gt;
<br>&nbsp;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;<br><br><br>In the command line I get the following:<br><br>Test step verifyTitle (C:\canoo\doc\samples\SimpleTest.xml:35: )&nbsp; named &quot;Kabira<br>Order Processing follows if login ok&quot; failed with message &quot;Wrong document title
<br>found! Expected &quot;Kabira Order Processing&quot; but got &quot;&quot;&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.canoo.webtest.ant.WebtestTask.stopBuildIfNeeded(WebtestTask.java:<br>191)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.canoo.webtest.ant.WebtestTask.execute
(WebtestTask.java:160)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.tools.ant.Task.perform(Task.java:364)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.tools.ant.Target.execute(Target.java
:341)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.tools.ant.Target.performTasks(Target.java:369)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.tools.ant.Project.executeTarget(Project.java
:1185)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe<br>cutor.java:40)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.tools.ant.Project.executeTargets(Project.java:1068)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.tools.ant.Main.runBuild
(Main.java:668)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.tools.ant.Main.startAnt(Main.java:187)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.tools.ant.launch.Launcher.main(Launcher.java
:67)<br><br><br>I have tried setting ANT_OPTS=&quot;-DlogLevel.root=debug&quot; in the log4j.properties file but don&#39;t seem to get any more information.<br><br>Is there a way to find out more about what is happening?&nbsp; 
<br><br>Thanks<br><br>Ian<br><br><br>

------=_Part_28887_1648623.1167985579064--