[Webtest] Clickbutton with index not working
Lisa Crispin
webtest@lists.canoo.com
Tue, 16 Nov 2004 20:52:57 +0000
--NextPart_Webmail_9m3u9jl4l_29986_1100638377_0
Content-Type: text/plain
Content-Transfer-Encoding: 8bit
Great! Thank you, Marc!
-- Lisa
-------------- Original message from Marc Guillemot <mguillemot@yahoo.fr>: --------------
> Hi Lisa,
>
> if the server does it works, next build should allow to specify a button to
> click using its id.
>
> Marc.
>
> Lisa Crispin wrote:
> > Hi Marc,
> > In our legacy code, it's a problem because on some pages there aree
> > multiple buttons same label and no name attribute, so no way to
> > distinguish them. I was using the index. I'm working around that
> > now by just using invoke, it's not that huge a deal to me because we're
> > phasing out this old code.
> >
> > In our new code, although we had discussed how things needed unique
> > names for WebTest to work, a programmer forgot that and produced a page
> > for a review process that had 8 buttons all with the label 'Review' and
> > no unique name. Actually we had thought we could use id but saw in the
> > WebTest doc that only the text in the value attribute or the value of
> > the name attribute can be used. So we're changing the HTML to include
> > the name attribute for each button. I think it's better to do this
> > anyway, so I don't miss the index locator myself. However, I think
> > people who are stuck with legacy code that has buttons with the same
> > label and no name would still like to have something like that. If you
> > use 'invoke' and the button actually breaks, you won't ever know.
> >
> > Thanks,
> > Lisa
> >
> >
> > -------------- Original message from Marc Guillemot
> > : --------------
> >
> >
> > > Hi Lisa,
> > >
> > > I've removed it because it was useless in the selftests.
> > Furthermore I think
> > > that it is a bad practice to rely on the
> > > order of buttons to write a test: when the designer decide that
> > it now looks
> > > nicer to have first button on the right and
> > > second button on the left, your test will fail. And an index
> > indication can only
> > > rely on the position in the html source
> > > code, even if the displayed order looks different.
> > >
> > > Nevertheless feel free to provide a test where the index locator
> > is really
> > > needed.
> > >
> > > Clickbutton is missing an htmlid attribute to allow perfect
> > identification of
> > > the button to click.
> > >
> > > Marc.
> > >
> > > Lisa Crispin wrote:
> > > > Thanks, Marc.
> > > > Is there some feature which took the place of index? What would
> > you do
> > > > if you need this functionality?
> > > > thanks,
> > > > Lisa
> > > >
> > > > -------------- Original message from Marc Guillemot
> > > > : --------------
> > > >
> > > >
> > > > > Hi Lisa,
> > > > >
> > > > > yes, index has been removed. The doc is not uptodate, sorry.
> > > > >
> > > > > Marc.
> > > > >
> > > > > Lisa Crispin wrote:
> > > > > > I'm getting the following error running a script which
> > works in
> > > > the
> > > > > > HTTPUnit-based WebTest. I'm using build 560.
> > > > > >
> > > > > > C:\java\eplan\build.xml:901: Following error occured while
> > > > executing
> > > > > > this line
> > > > > >
> > C:\java\eplan\test\WebTest\SmokeTest\EmployeeEnrollTest.xml:23:
> > > > The
> > > > > >
> > > > > > > type doesn't support the nested "index" element.
> > > > > >
> > > > > > This line number 23 in that file is just the testSpec, but I
> > > > think it
> > > > > > must actually be complaining about this:
> > > > > >
> > > > > >
> > > > > > label="Search..." >
> > > > > >
> > > > > >
> > > > > > The doc shows this is still supported, has it been deprecated?
> > > > I can
> > > > > > work around it, but I'm just curious.
> > > > > > thanks,
> > > > > > 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_29986_1100638377_0
Content-Type: text/html
Content-Transfer-Encoding: 8bit
<html>
<!-- BEGIN WEBMAIL STATIONERY -->
<head></head>
<body>
<!-- WEBMAIL STATIONERY noneset -->
<DIV></DIV>
<DIV>Great! Thank you, Marc!</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>> if the server does it works, next build should allow to specify a button to <BR>> click using its id. <BR>> <BR>> Marc. <BR>> <BR>> Lisa Crispin wrote: <BR>> > Hi Marc, <BR>> > In our legacy code, it's a problem because on some pages there aree <BR>> > multiple buttons same label and no name attribute, so no way to <BR>> > distinguish them. I was using the index. I'm working around that <BR>> > now by just using invoke, it's not that huge a deal to me because we're <BR>> > phasing out this old code. <BR>> > <BR>> > In our new code, although we had discussed how things needed unique <BR>> > names for WebTest to work, a programmer forgot that and produced a page <BR>> > for a review process that had 8 buttons all with the label 'Review' and <BR>> > no unique name. Actually we had thought we could use id but saw in the <BR>> > WebTest doc that only the text in the value attribute or the value of <BR>> > the name attribute can be used. So we're changing the HTML to include <BR>> > the name attribute for each button. I think it's better to do this <BR>> > anyway, so I don't miss the index locator myself. However, I think <BR>> > people who are stuck with legacy code that has buttons with the same <BR>> > label and no name would still like to have something like that. If you <BR>> > use 'invoke' and the button actually breaks, you won't ever know. <BR>> > <BR>> > Thanks, <BR>> > Lisa <BR>> > <BR>> > <BR>> > -------------- Original message from Marc Guillemot <BR>> > <MGUILLEMOT@YAHOO.FR>: -------------- <BR>> > <BR>> > <BR>> > > Hi Lisa, <BR>> > > <BR>> > > I've removed it because it was useless in the selftests. <BR>> > Furthermore I think <BR>> > > that it is a bad practice to rely on the <BR>> > > order of buttons to write a test: when the designer decide that <BR>> > it now looks <BR>> > > nicer to have first button on the right and <BR>> > > second button on the left, your test will fail. And an index <BR>> > indication can only <BR>> > > rely on the position in the html source <BR>> > > code, even if the displayed order looks different. <BR>> > > <BR>> > > Nevertheless feel free to provide a test where the index locator <BR>> > is really <BR>> > > needed. <BR>> > > <BR>> > > Clickbutton is missing an htmlid attribute to allow perfect <BR>> > identification of <BR>> > > the button to click. <BR>> > > <BR>> > > Marc. <BR>> > > <BR>> > > Lisa Crispin wrote: <BR>> > > > Thanks, Marc. <BR>> > > > Is there some feature which took the place of index? What would <BR>> > you do <BR>> > > > if you need this functionality? <BR>> > > > thanks, <BR>> > > > Lisa <BR>> > > > <BR>> > > > -------------- Original message from Marc Guillemot <BR>> > > > : -------------- <BR>> > > > <BR>> > > > <BR>> > > > > Hi Lisa, <BR>> > > > > <BR>> > > > > yes, index has been removed. The doc is not uptodate, sorry. <BR>> > > > > <BR>> > > > > Marc. <BR>> > > > > <BR>> > > > > Lisa Crispin wrote: <BR>> > > > > > I'm getting the following error running a script which <BR>> > works in <BR>> > > > the <BR>> > > > > > HTTPUnit-based WebTest. I'm using build 560. <BR>> > > > > > <BR>> > > > > > C:\java\eplan\build.xml:901: Following error occured while <BR>> > > > executing <BR>> > > > > > this line <BR>> > > > > > <BR>> > C:\java\eplan\test\WebTest\SmokeTest\EmployeeEnrollTest.xml:23: <BR>> > > > The <BR>> > > > > > <BR>> > > > > > > type doesn't support the nested "index" element. <BR>> > > > > > <BR>> > > > > > This line number 23 in that file is just the testSpec, but I <BR>> > > > think it <BR>> > > > > > must actually be complaining about this: <BR>> > > > > > <BR>> > > > > > <BR>> > > > > > label="Search..." > <BR>> > > > > > <BR>> > > > > > <BR>> > > > > > The doc shows this is still supported, has it been deprecated? <BR>> > > > I can <BR>> > > > > > work around it, but I'm just curious. <BR>> > > > > > thanks, <BR>> > > > > > Lisa <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>
<!-- END WEBMAIL STATIONERY -->
</body>
</html>
--NextPart_Webmail_9m3u9jl4l_29986_1100638377_0--