[Webtest] Re: javascript link (Denis N. Antonioli) RE: WebTest digest, Vol 1 #1860 - 5 msgs

Francisco Javier Martin Gutierrez francisco-javier.martin@thalesgroup.com
Thu, 7 Jun 2007 13:18:19 +0200


Hello:

Thank all for your disinterested help. After last mail I think that I =
got
the correct regular expression.

LINK
<a href=3D"javascript:eliminar('10101A', 'prueba marcos');"><img
src=3D"imagenes/ico_eliminar.gif" alt=3D"eliminar" width=3D"8" =
height=3D"9"
border=3D"0"></a>=20

REGULAR EXPRESSION
text=3D"&lt;a\shref=3D&quot;javascript:eliminar\(&apos;10101A&apos;,\s&ap=
os;prue
ba\smarcos&apos;\);&quot;&gt;&lt;img\ssrc=3D&quot;imagenes/ico_eliminar.g=
if&qu
ot;\salt=3D&quot;eliminar&quot;\swidth=3D&quot;8&quot;\sheight=3D&quot;9&=
quot;\sbo
rder=3D&quot;0&quot;&gt;&lt;/a&gt;"   =20

I have learnt a lot about regular expressions but the expected result =
did
not arrive. Test failed again.=20

TEST REPORT
[storeRegEx]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step:
storeRegEx "Extract target location from javascript command" (58/61)
[invoke]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: invoke
"Invoke target page specified in the javascript statement" (58/61)
[invoke]  INFO (com.canoo.webtest.steps.request.AbstractTargetAction) - =
->
gotoTarget by URL: <a href=3D"javascript:eliminar('10101A', 'prueba
marcos');"><img src=3D"imagenes/ico_eliminar.gif" alt=3D"eliminar" =
width=3D"8"
height=3D"9" border=3D"0"></a>
[invoke]  INFO (com.canoo.webtest.steps.request.TargetHelper) - getting
response for url: http://espinete:7783/sauss/<a
href=3D"javascript:eliminar('10101A', 'prueba marcos');"><img
src=3D"imagenes/ico_eliminar.gif" alt=3D"eliminar" width=3D"8"
height=3D"9" border=3D"0"></a>
[invoke]  INFO (com.gargoylesoftware.htmlunit.WebClient) - =
statusCode=3D[404]
contentType=3D[text/html]
[invoke]  INFO (com.gargoylesoftware.htmlunit.WebClient)
-<HTML><HEAD><TITLE>404 Not Found</TITLE></HEAD><BODY><H1>4
04 Not
Found</H1>Resource/sauss/%3Ca%20href=3D%22javascript:eliminar('10101A',%2=
0'pru
eba%20marcos');%22%3E%3Cimg%20src=3D%22imagenes/ico_eliminar.gif%22%20alt=
=3D%22e
liminar%22%20width=3D%228%22%20height=3D%229%22%20border=3D%220%22%3E%3C/=
a%3E not
found on this server</BODY></HTML>

However, I appreciate your suggestions and if you have any other idea to
click on the link, I will be happy to try it again.


Francisco Javier Mart=EDn=20
Desarrollo de Proyectos - Valladolid
Security Solutions & Services Division =09
	=20
Edif. Solar, Of. 13, 14, 15
Parque Tecnol=F3gico Boecillo. 47151 Valladolid. Espa=F1a
Tel.: 983 54 65 55   Fax: 983 54 66 09	=20
	=20
-----Mensaje original-----
De: webtest-admin@lists.canoo.com [mailto:webtest-admin@lists.canoo.com] =
En
nombre de webtest-request@lists.canoo.com
Enviado el: martes, 05 de junio de 2007 12:02
Para: webtest@lists.canoo.com
Asunto: WebTest digest, Vol 1 #1860 - 5 msgs

Send WebTest mailing list submissions to
	webtest@lists.canoo.com

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.canoo.com/mailman/listinfo/webtest
or, via email, send a message with subject or body 'help' to
	webtest-request@lists.canoo.com

You can reach the person managing the list at
	webtest-admin@lists.canoo.com

When replying, please edit your Subject line so it is more specific
than "Re: Contents of WebTest digest..."


Today's Topics:

   1. Re: 1. Re: 6. Re: javascript link (Denis N. Antonioli)
       #1856 - 2 msgs (Marc Guillemot) (Michael Habbert)
   2. posting forms with Spring (Lisa Crispin)
   3. Re: posting forms with Spring (Marc Guillemot)
   4. [webtest][JIRA] Created: (WT-311) Allow nested properties =
expansion
(Marc Guillemot (JIRA))

--__--__--

Message: 1
Date: Mon, 04 Jun 2007 16:03:36 +0200
From: Michael Habbert <Michael.Habbert@netpioneer.de>
To: webtest@lists.canoo.com
Subject: Re: [Webtest] 1. Re: 6. Re: javascript link (Denis N. =
Antonioli)
 #1856 - 2 msgs (Marc Guillemot)
Reply-To: webtest@lists.canoo.com
Reply-To: Michael Habbert <Michael.Habbert@netpioneer.de>

Hi Francisco Javier Martin Gutierrez,


Francisco Javier Martin Gutierrez wrote:
> Hello Marc:
>=3D20
> =3D20
>=3D20
> I thought about you say concerning information before or after the =
link=3D
=3D20
> that could change the form to click on the link. Sorry, but I =
still=3D20
> think the same I though before. The page looks like any easy page to =
be=3D
=3D20
> analyzed. All links on the page can be followed except this kind =
of=3D20
> links. There are evidence about StoreRegEx is not working properly =
or=3D20
> this link is unsupported,

I looked into your last mails and found your RegExpression:

<storeRegEx description=3D3D"Extract target location from javascript =
comman=3D
d"
       =
text=3D3D".*name=3D3D&quot;href&quot;.*href=3D3D&quot;javascript:elimina=3D=

r(10101A,prueba marcos)&quot;"
       property=3D3D"targetLocation" />

I do wonder how you expect this text-RegExp to match to your href-tags =
??=3D
?

> [storeRegEx]  INFO (com.canoo.webtest.steps.Step) - Message was: =
No=3D20
> match for regular expression <.*name=3D3D"a".*href=3D3D"elim
>=3D20
> inar('10101A', 'prueba marcos')">

of course not!


> Sorry, I wouldn't disturb anymore about this. I think I've tried all I =
=3D

> can, so if we can't found the solution this time I will leave the =
probl=3D
em.

Don't give up! When you provide us with the neccessary information we =
wil=3D
l able to track down the=3D20
problem and provide a fixture or a workaround - usually ;-)

[...]
>                 <td bgcolor=3D3D"#FBFBFB" colspan=3D3D"3"/>
>=3D20
>                 <td align=3D3D"center" bgcolor=3D3D"#FBFBFB"><a=3D20
> href=3D3D"javascript:eliminar('10101A', 'prueba marcos');"><img=3D20
> src=3D3D"imagenes/ico_eliminar.gif" alt=3D3D"eliminar" width=3D3D"8" =
height=3D3D=3D
"9"=3D20
> border=3D3D"0"></a></td>
[...]

I would suggest for your RegEx-string something like:

text=3D3D"&lt;a\shref=3D3D&quot;javascript\:eliminar\(&apos;(\d{5}\w&apos=
; ..=3D
=3D2E.

what do you think;-)

--=3D20
Mit freundlichen Gr=3DC3=3DBC=3DC3=3D9Fen

Michael Habbert


--__--__--

Message: 2
Date: Mon, 4 Jun 2007 14:05:01 -0600
From: "Lisa Crispin" <lisa.crispin@gmail.com>
To: webtest@lists.canoo.com
Subject: [Webtest] posting forms with Spring
Reply-To: webtest@lists.canoo.com
Reply-To: "Lisa Crispin" <lisa.crispin@gmail.com>

------=3D_Part_29283_14963948.1180987501370
Content-Type: text/plain; charset=3DISO-8859-1; format=3Dflowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

When using Spring for UI development, it uses the same controller for =
the
get and the post of a form (eg, SimpleFormController).  When the form is
posted, Spring reattaches the parameters from the get to the posted
request.  Is there any way to simulate this behavior in WebTest?  I.E., =
when
a submit button is clicked, specify additional parameters for the posted
request.
thanks
Lisa

------=3D_Part_29283_14963948.1180987501370
Content-Type: text/html; charset=3DISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

When using Spring for UI development, it uses the same controller for =
the
get and the post of a form (eg, SimpleFormController).&nbsp; When the =
form
is posted, Spring reattaches the parameters from the get to the posted
request.&nbsp; Is there any way to simulate this behavior in =
WebTest?&nbsp;=20
I.E., when a submit button is clicked, specify additional parameters for =
the
posted request. <br>thanks<br>Lisa<br>

------=3D_Part_29283_14963948.1180987501370--

--__--__--

Message: 3
Date: Tue, 5 Jun 2007 01:34:47 -0700 (PDT)
From: Marc Guillemot <mguillemot@yahoo.fr>
To: webtest@lists.canoo.com
Subject: Re: [Webtest] posting forms with Spring
Reply-To: webtest@lists.canoo.com
Reply-To: Marc Guillemot <mguillemot@yahoo.fr>


Hi Lisa,

I'm not sure to understand. You want to use WebTest here to do something
that wouldn't be possible with a "normal" browser. Is this correct?

Marc.


Lisa Crispin-2 wrote:
>=20
> When using Spring for UI development, it uses the same controller for =
the
> get and the post of a form (eg, SimpleFormController).  When the form =
is
> posted, Spring reattaches the parameters from the get to the posted
> request.  Is there any way to simulate this behavior in WebTest?  =
I.E.,
> when
> a submit button is clicked, specify additional parameters for the =
posted
> request.
> thanks
> Lisa
>=20
>=20

--=20
View this message in context:
http://www.nabble.com/posting-forms-with-Spring-tf3867639.html#a10965488
Sent from the WebTest mailing list archive at Nabble.com.


--__--__--

Message: 4
Date: Tue, 5 Jun 2007 11:36:11 +0200 (CEST)
From: "Marc Guillemot (JIRA)" <noreply@canoo.com>
To: webtest@lists.canoo.com
Subject: [Webtest] [webtest][JIRA] Created: (WT-311) Allow nested =
properties
expansion
Reply-To: webtest@lists.canoo.com
Reply-To: "Marc Guillemot (JIRA)" <noreply@canoo.com>

Allow nested properties expansion
---------------------------------

         Key: WT-311
         URL: http://webtest-community.canoo.com/jira/browse/WT-311
     Project: WebTest
        Type: New Feature

    Versions: 2.5   =20
    Reporter: Marc Guillemot
 Assigned to: Marc Guillemot=20


Currently nested properties are not evaluated, this is an old Ant
enhancement request
(http://issues.apache.org/bugzilla/show_bug.cgi?id=3D29347) that will =
probably
never be implemented.

In the case of WebTest this would be particularly helpful, for instance =
in
scenario like:
<repeat count=3D"...">

    <.. do something... someAttr=3D"${someProp.#{counter}}"/>
</repeat>

this would allow to access properties someProp.1, someProp.2, ...

--=20
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://webtest-community.canoo.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



--__--__--

_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest


End of WebTest Digest


AVISO LEGAL: La informacion contenida en este mensaje y cualquier documen=
to adjunto en el mismo es confidencial, puede estar legalmente protegida =
y esta dirigida solamente al destinatario. La publicacion, uso, distribuc=
ion, impresion o copia no autorizada del contenido de este mensaje, esta =
estrictamente prohibida y puede ser ilegal. Si Vd. ha recibido este mensa=
je por error, le rogamos destruya el mensaje y lo notifique al remitente =
o llame al telefono (+34) 91 556 92 62.

DISCLAIMER: The information contained in this message and any attached do=
cument is confidential, covered by law and intended solely for the recipi=
ent. The distribution, print, publication, unauthorised copy and / or use=
 of the message content is strictly forbidden and could be deemed illegal=
. If you are not the intended recipient of this message, we request that =
you destroy it and notify the sender either in writing or by calling ++34=
 91 556 92 62.