[Webtest] Javascript buttons
Lisa Crispin
webtest@lists.canoo.com
Fri, 19 Nov 2004 18:37:14 +0000
--NextPart_Webmail_9m3u9jl4l_14107_1100889434_0
Content-Type: text/plain
Content-Transfer-Encoding: 8bit
Hi Marc,
We had considered that, but I ran the html through a validator and it did not complain about not having a form. We can see why you would say this, though.
I still have a question however: If the form is required, then why does it work using htmlid and no form?
Thanks (as always for your wonderful help!)
Lisa
-------------- Original message from Marc Guillemot <mguillemot@yahoo.fr>: --------------
> Hi Lisa,
>
> your html page is not valid: the input should be surrounded by a form. After
> having fixed that, everything works right
> for me.
>
> NB: the kind of simple example you sent was exactly right: as small as possible
> to allow someone else to test it without
> first having to understand some private business logic.
>
> Marc.
>
>
> Lisa Crispin wrote:
> > Hi Marc,
> > When we did further testing using our little sample page, we found that
> > clickbutton using htmlid would work, but not using label or name. We
> > don't use htmlid up to now, but we can add it to work around this
> > problem. However, it looks like a bug to me that clickbutton with name
> > or label doesn't work in this case. Here is the HTML (the button just
> > goes to www.yahoo.com , which gets an error itself
> > when WebTest gets to it, but we're not debugging Yahoo's problems!)
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Here is my WebTest code (is this what you need?) I have 3 clickbuttons,
> > uncomment each one and try. One works (with htmlid) and the other two
> > get 'No button found'.
> >
> >
> > > > url="/javascript_test/test3.html"/>
> >
> > > > text="This is Canoo Test 3"/>
> >
> >
> >
> >
> > > > name="testButtonName" />
> >
> >
> >
> >
> >
> > Thanks,
> > Lisa
> >
> >
> >
> > -------------- Original message from Marc Guillemot
> > : --------------
> >
> >
> > > Lisa,
> > >
> > > current version support javascript buttons and some tests are
> > contained in the
> > > selftests. Can you provide a minimal
> > > (always the same thing) sample of the problem?
> > >
> > > Marc.
> > >
> > > Lisa Crispin wrote:
> > > > Using build 560, clickbutton can't find the button if it is a
> > Javascript
> > > > button (this didn't work with the HTTPUnit WebTest either).
> > Here's an
> > > > example:
> > > >
> > > > type="button" value="Review" onclick="javascript: location.href =
> > > > '/plan/reviewCompensation.vm';">
> > > >
> > > > Does the HtmlUnit-based WebTest support Javascript buttons?
> > > > Thank you,
> > > > Lisa
> > > >
> > >
> > > _______________________________________________
> > > WebTest mailing list
> > > WebTest@lists.canoo.com
> > > http://lists.canoo.com/mailman/listinfo/webtest
> >
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
--NextPart_Webmail_9m3u9jl4l_14107_1100889434_0
Content-Type: text/html
Content-Transfer-Encoding: 8bit
<html>
<!-- BEGIN WEBMAIL STATIONERY -->
<head></head>
<body>
<!-- WEBMAIL STATIONERY noneset -->
<DIV></DIV>
<DIV>Hi Marc,</DIV>
<DIV>We had considered that, but I ran the html through a validator and it did not complain about not having a form. We can see why you would say this, though. </DIV>
<DIV> </DIV>
<DIV>I still have a question however: If the form is required, then why does it work using htmlid and no form?</DIV>
<DIV>Thanks (as always for your wonderful help!)</DIV>
<DIV>Lisa</DIV><BR>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">-------------- Original message from Marc Guillemot <mguillemot@yahoo.fr>: -------------- <BR><BR><BR>> Hi Lisa, <BR>> <BR>> your html page is not valid: the input should be surrounded by a form. After <BR>> having fixed that, everything works right <BR>> for me. <BR>> <BR>> NB: the kind of simple example you sent was exactly right: as small as possible <BR>> to allow someone else to test it without <BR>> first having to understand some private business logic. <BR>> <BR>> Marc. <BR>> <BR>> <BR>> Lisa Crispin wrote: <BR>> > Hi Marc, <BR>> > When we did further testing using our little sample page, we found that <BR>> > clickbutton using htmlid would work, but not using label or name. We <BR>> > don't use htmlid up to now, but we can add it to work around this <BR>> > problem. However, it looks like a bug to me that clickbutton with name <BR>> > or label doesn't work in this case. Here is the HTML (the button just <BR>> > goes to www.yahoo.com <HTTP: www.yahoo.com>, which gets an error itself <BR>> > when WebTest gets to it, but we're not debugging Yahoo's problems!) <BR>> > <BR>> > <BR>> > <BR>> > <BR>> > <BR>> > <BR>> > <INPUT onclick="javascript: <BR>> > location.href = 'http://www.yahoo.com';" type=button value="Goto Yahoo"> <BR>> > <BR>> > <BR>> > <BR>> > Here is my WebTest code (is this what you need?) I have 3 clickbuttons, <BR>> > uncomment each one and try. One works (with htmlid) and the other two <BR>> > get 'No button found'. <BR>> > <BR>> > <STEPS><BR>> > <INVOKE <BR stepid="get page">> > url="/javascript_test/test3.html"/> <BR>> > <BR>> > <VERIFYTITLE <BR stepid="verify page">> > text="This is Canoo Test 3"/> <BR>> > <!-- clickbutton using htmlid works - the button is clicked (the
<BR>> > resulting page, Yahoo home page, causes a different error) --><BR>> > <!-- <clickbutton stepid="click the javascript button by id"
<BR>> > htmlid="testButtonId" /> --><BR>> > <BR>> > <!-- Click button using name or label gets a 'No button found' error' --><BR>> > <CLICKBUTTON <BR stepid="click the javascript button by name">> > name="testButtonName" /> <BR>> > <BR>> > <!-- <clickbutton stepid="click the javascript button by label"
<BR>> > label="GoTo Yahoo" /> --><BR>> > <BR>> > </STEPS><BR>> > <BR>> > Thanks, <BR>> > Lisa <BR>> > <BR>> > <BR>> > <BR>> > -------------- Original message from Marc Guillemot <BR>> > <MGUILLEMOT@YAHOO.FR>: -------------- <BR>> > <BR>> > <BR>> > > Lisa, <BR>> > > <BR>> > > current version support javascript buttons and some tests are <BR>> > contained in the <BR>> > > selftests. Can you provide a minimal <BR>> > > (always the same thing) sample of the problem? <BR>> > > <BR>> > > Marc. <BR>> > > <BR>> > > Lisa Crispin wrote: <BR>> > > > Using build 560, clickbutton can't find the button if it is a <BR>> > Javascript <BR>> > > > button (this didn't work with the HTTPUnit WebTest either). <BR>> > Here's an <BR>> > > > example: <BR>> > > > <BR>> > > > type="button" value="Review" onclick="javascript: location.href = <BR>> > > > '/plan/reviewCompensation.vm';"> <BR>> > > > <BR>> > > > Does the HtmlUnit-based WebTest support Javascript buttons? <BR>> > > > Thank you, <BR>> > > > Lisa <BR>> > > > <BR>> > > <BR>> > > _______________________________________________ <BR>> > > WebTest mailing list <BR>> > > WebTest@lists.canoo.com <BR>> > > http://lists.canoo.com/mailman/listinfo/webtest <BR>> > <BR>> <BR>> _______________________________________________ <BR>> WebTest mailing list <BR>> WebTest@lists.canoo.com <BR>> http://lists.canoo.com/mailman/listinfo/webtest </BLOCKQUOTE>
<!-- END WEBMAIL STATIONERY -->
</body>
</html>
--NextPart_Webmail_9m3u9jl4l_14107_1100889434_0--