[Webtest] Javascript buttons
Lisa Crispin
webtest@lists.canoo.com
Mon, 22 Nov 2004 17:20:50 +0000
--NextPart_Webmail_9m3u9jl4l_12052_1101144050_0
Content-Type: text/plain
Content-Transfer-Encoding: 8bit
I've been meaning to install Firefox, here's another good reason to do so (even though I have to do most of my testing in IE).
Thanks, I agree it is not urgent, works fine for us as is.
-- Lisa
-------------- Original message from Marc Guillemot <mguillemot@yahoo.fr>: --------------
> Hi Lisa,
>
> a "normal" validator would notify a warning for an input outside a form (if you
> use Mozilla/Firefox, you can use the
> great plugin "HTML VALIDATOR (based on Tidy)" that displays validation results
> when looking at the source of a html file
> direct from the browser: http://users.skynet.be/mgueury/mozilla/)
>
> Back to your "input": the difference comes from the current way used by
> "clickbutton" to locate the button. When the
> html id is specified it asks directly the document for the element with this id.
> It is therfore found even outside a
>
. Without html id, all the forms are examined to look if one of them
> contains the desired button. I agree that
> this could be changed to find inputs even when they are outside a form but I
> don't see this as very urgent
>
> Marc.
>
> Lisa Crispin wrote:
> > 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
> > : --------------
> >
> >
> > > 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
> >
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
--NextPart_Webmail_9m3u9jl4l_12052_1101144050_0
Content-Type: text/html
Content-Transfer-Encoding: 8bit
<html>
<!-- BEGIN WEBMAIL STATIONERY -->
<head></head>
<body>
<!-- WEBMAIL STATIONERY noneset -->
<DIV></DIV>
<DIV>I've been meaning to install Firefox, here's another good reason to do so (even though I have to do most of my testing in IE).</DIV>
<DIV> </DIV>
<DIV>Thanks, I agree it is not urgent, works fine for us as is.</DIV>
<DIV>-- Lisa<BR></DIV>
<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>> a "normal" validator would notify a warning for an input outside a form (if you <BR>> use Mozilla/Firefox, you can use the <BR>> great plugin "HTML VALIDATOR (based on Tidy)" that displays validation results <BR>> when looking at the source of a html file <BR>> direct from the browser: http://users.skynet.be/mgueury/mozilla/) <BR>> <BR>> Back to your "input": the difference comes from the current way used by <BR>> "clickbutton" to locate the button. When the <BR>> html id is specified it asks directly the document for the element with this id. <BR>> It is therfore found even outside a <BR>>
<FORM>. Without html id, all the forms are examined to look if one of them <BR>> contains the desired button. I agree that <BR>> this could be changed to find inputs even when they are outside a form but I <BR>> don't see this as very urgent <BR>> <BR>> Marc. <BR>> <BR>> Lisa Crispin wrote: <BR>> > Hi Marc, <BR>> > We had considered that, but I ran the html through a validator and it <BR>> > did not complain about not having a form. We can see why you would say <BR>> > this, though. <BR>> > <BR>> > I still have a question however: If the form is required, then why does <BR>> > it work using htmlid and no form? <BR>> > Thanks (as always for your wonderful help!) <BR>> > Lisa <BR>> > <BR>> > -------------- Original message from Marc Guillemot <BR>> > <MGUILLEMOT@YAHOO.FR>: -------------- <BR>> > <BR>> > <BR>> > > Hi Lisa, <BR>> > > <BR>> > > your html page is not valid: the input should be surrounded by a <BR>> > 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 <BR>> > 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 <BR>> > found that <BR>> > > > clickbutton using htmlid would work, but not using label or <BR>> > 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 <BR>> > with name <BR>> > > > or label doesn't work in this case. Here is the HTML (the <BR>> > button just <BR>> > > > goes to www.yahoo.com , which gets an error itself <BR>> > > > when WebTest gets to it, but we're not debugging Yahoo's <BR>> > problems!) <BR>> > > > <BR>> > > > <BR>> > > > <BR>> > > > <BR>> > > > <BR>> > > > <BR>> > > > <BR>> > > > <BR>> > > > <BR>> > > > <BR>> > > > Here is my WebTest code (is this what you need?) I have 3 <BR>> > clickbuttons, <BR>> > > > uncomment each one and try. One works (with htmlid) and the <BR>> > other two <BR>> > > > get 'No button found'. <BR>> > > > <BR>> > > > <BR>> > > > <BR>> > > > url="/javascript_test/test3.html"/> <BR>> > > > <BR>> > > > <BR>> > > > text="This is Canoo Test 3"/> <BR>> > > > <BR>> > > > <BR>> > > > <BR>> > > > <BR>> > > > <BR>> > > > name="testButtonName" /> <BR>> > > > <BR>> > > > <BR>> > > > <BR>> > > > <BR>> > > > <BR>> > > > Thanks, <BR>> > > > Lisa <BR>> > > > <BR>> > > > <BR>> > > > <BR>> > > > -------------- Original message from Marc Guillemot <BR>> > > > : -------------- <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: <BR>> > 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 <BR>> > <BR>> <BR>> _______________________________________________ <BR>> WebTest mailing list <BR>> WebTest@lists.canoo.com <BR>> http://lists.canoo.com/mailman/listinfo/webtest </BLOCKQUOTE></FORM>
<!-- END WEBMAIL STATIONERY -->
</body>
</html>
--NextPart_Webmail_9m3u9jl4l_12052_1101144050_0--