[Webtest] Login Problem

Ian Phillips Ian Phillips" <phillipsic@gmail.com
Mon, 30 Apr 2007 14:53:50 +0200


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

Hi Marc.

I have monitored the http conversation and the correct information does
appear to be sent.  I have been told by the developer that cookies are not
used.

Thanks.

Ian


On 4/30/07, Marc Guillemot <mguillemot@yahoo.fr> wrote:
>
> Hi Ian,
>
> have you tried to monitor the http conversation? Do you use cookies? May
> it be due to a cookie format problem?
>
> Marc.
>
> Ian Phillips wrote:
> > Hi.
> >
> > I am having a problem getting webtest to login.  It appears not to
> > accept the username and/or password.
> >
> > My login page looks like this:
> >
> > FORM METHOD=post
> > ACTION
> > ="index.php">
> > <table align=center>
> >       <
> > tr><th>Name: <td><INPUT
> >  SIZE=10
> > NAME="login">
> >       <tr><th>Password:<
> > td> <INPUT SIZE
> > =10 TYPE="password"
> > NAME="passwd">
> >       <tr><td colspan
> > =2 align
> > =center>
> >
> >       <INPUT
> >  TYPE="hidden" NAME="what" VALUE=
> > "loggon_step"
> >>
> >       <INPUT TYPE="hidden" NAME=
> > "myGroup" VALUE="-1">
> >       <INPUT
> >  TYPE=
> > "submit" VALUE=" Login ">
> > </table>
> > </FORM>
> >
> > My script looks like this:
> >
> > <project name="SimpleTest" basedir="." default="main">
> >
> >   <property name="webtest.home" location="C:\canoo" />
> >   <import file="${webtest.home}/lib/taskdef.xml"/>
> >
> >   <target name="main">
> >     <webtest name="myTest">
> >       <config
> >         host="wokingham"
> >         port="29920"
> >         protocol="http"
> >         basepath=""
> >         summary="true"
> >         saveresponse="true"
> >         autorefresh="true"/>
> >
> >       <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="*****" />
> >         <clickButton
> >           label=" Login "
> >           description="Login" />
> >         <verifyTitle
> >           description="we should see the Admin title"
> >           text="KPSA Administration" />
> >       </steps>
> >     </webtest>
> >   </target>
> > </project>
> >
> > I can manually login so I know the username/password are OK.  When I run
> > the test above I get a page saying the login has failed.  None of the
> > steps appear to fail until I try to validate the title of the admin
> page.
> >
> > Thanks for any help.
> >
> > Ian
> >
> >
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>

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

Hi Marc.<br><br>I have monitored the http conversation and the correct information does appear to be sent.&nbsp; I have been told by the developer that cookies are not used.<br><br>Thanks.<br><br>Ian<br><br><br><div><span class="gmail_quote">
On 4/30/07, <b class="gmail_sendername">Marc Guillemot</b> &lt;<a href="mailto:mguillemot@yahoo.fr">mguillemot@yahoo.fr</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Ian,<br><br>have you tried to monitor the http conversation? Do you use cookies? May<br>it be due to a cookie format problem?<br><br>Marc.<br><br>Ian Phillips wrote:<br>&gt; Hi.<br>&gt;<br>&gt; I am having a problem getting webtest to login.&nbsp;&nbsp;It appears not to
<br>&gt; accept the username and/or password.<br>&gt;<br>&gt; My login page looks like this:<br>&gt;<br>&gt; FORM METHOD=post<br>&gt; ACTION<br>&gt; =&quot;index.php&quot;&gt;<br>&gt; &lt;table align=center&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;
<br>&gt; tr&gt;&lt;th&gt;Name: &lt;td&gt;&lt;INPUT<br>&gt;&nbsp;&nbsp;SIZE=10<br>&gt; NAME=&quot;login&quot;&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;tr&gt;&lt;th&gt;Password:&lt;<br>&gt; td&gt; &lt;INPUT SIZE<br>&gt; =10 TYPE=&quot;password&quot;<br>
&gt; NAME=&quot;passwd&quot;&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;tr&gt;&lt;td colspan<br>&gt; =2 align<br>&gt; =center&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;INPUT<br>&gt;&nbsp;&nbsp;TYPE=&quot;hidden&quot; NAME=&quot;what&quot; VALUE=<br>&gt; &quot;loggon_step&quot;
<br>&gt;&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;INPUT TYPE=&quot;hidden&quot; NAME=<br>&gt; &quot;myGroup&quot; VALUE=&quot;-1&quot;&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;INPUT<br>&gt;&nbsp;&nbsp;TYPE=<br>&gt; &quot;submit&quot; VALUE=&quot; Login &quot;&gt;<br>&gt; &lt;/table&gt;
<br>&gt; &lt;/FORM&gt;<br>&gt;<br>&gt; My script looks like this:<br>&gt;<br>&gt; &lt;project name=&quot;SimpleTest&quot; basedir=&quot;.&quot; default=&quot;main&quot;&gt;<br>&gt;<br>&gt;&nbsp;&nbsp; &lt;property name=&quot;webtest.home
&quot; location=&quot;C:\canoo&quot; /&gt;<br>&gt;&nbsp;&nbsp; &lt;import file=&quot;${webtest.home}/lib/taskdef.xml&quot;/&gt;<br>&gt;<br>&gt;&nbsp;&nbsp; &lt;target name=&quot;main&quot;&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;webtest name=&quot;myTest&quot;&gt;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;config<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; host=&quot;wokingham&quot;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; port=&quot;29920&quot;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; protocol=&quot;http&quot;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; basepath=&quot;&quot;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; summary=&quot;true&quot;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; saveresponse=&quot;true&quot;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; autorefresh=&quot;true&quot;/&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;steps&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;invoke<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; description=&quot;get Login Page&quot;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; url=&quot;&quot; /&gt;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;verifyTitle<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; description=&quot;we should see the login title&quot;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text=&quot;KPSA&quot; /&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;setInputField description=&quot;set user name&quot;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name=&quot;login&quot;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value=&quot;KOPAdmin&quot; /&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;setInputField description=&quot;set password&quot;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name=&quot;passwd&quot;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value=&quot;*****&quot; /&gt;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;clickButton<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; label=&quot; Login &quot;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; description=&quot;Login&quot; /&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;verifyTitle<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; description=&quot;we should see the Admin title&quot;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text=&quot;KPSA Administration&quot; /&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/steps&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/webtest&gt;<br>&gt;&nbsp;&nbsp; &lt;/target&gt;<br>&gt; &lt;/project&gt;<br>&gt;<br>&gt; I can manually login so I know the username/password are OK.&nbsp;&nbsp;When I run
<br>&gt; the test above I get a page saying the login has failed.&nbsp;&nbsp;None of the<br>&gt; steps appear to fail until I try to validate the title of the admin page.<br>&gt;<br>&gt; Thanks for any help.<br>&gt;<br>&gt; Ian<br>
&gt;<br>&gt;<br><br>_______________________________________________<br>WebTest mailing list<br><a href="mailto:WebTest@lists.canoo.com">WebTest@lists.canoo.com</a><br><a href="http://lists.canoo.com/mailman/listinfo/webtest">
http://lists.canoo.com/mailman/listinfo/webtest</a><br></blockquote></div><br>

------=_Part_10187_6105945.1177937630384--