11 messages in com.canoo.lists.webtestRe: [Webtest] setInputField by ID| From | Sent On | Attachments |
|---|---|---|
| Maxim Annyuk | 08 Dec 2005 06:44 | |
| Lothar Märkle | 08 Dec 2005 07:59 | |
| Marc Guillemot | 08 Dec 2005 08:36 | |
| Maxim Annyuk | 09 Dec 2005 09:05 | |
| Dierk Koenig | 09 Dec 2005 09:49 | |
| Edgar P Dollin | 10 Dec 2005 06:32 | |
| Dierk Koenig | 10 Dec 2005 07:34 | |
| Lothar =?unknown-8bit?Q?M=E4rkle?= | 10 Dec 2005 13:13 | |
| Paul King | 11 Dec 2005 02:59 | |
| Marc Guillemot | 12 Dec 2005 01:36 | |
| Denis N. Antonioli | 12 Dec 2005 06:48 |
| Subject: | Re: [Webtest] setInputField by ID![]() |
|---|---|
| From: | Lothar =?unknown-8bit?Q?M=E4rkle?= (loth...@netpioneer.de) |
| Date: | 12/10/2005 01:13:57 PM |
| List: | com.canoo.lists.webtest |
Hello Maxim,
On Fri, Dec 09, 2005 at 08:05:36PM +0300, Maxim Annyuk wrote:
LM> Following the html dtd, the name attribute is #IMPLIED, so it is valid LM> to omit it. But how useful is a input field without a name?
Sometimes job can be done by JavaScript and there is no necessity to specify "name" attribute. Especially if you don't want this value to be sent to server when the form is submitted.
I did not thought of this. Do all browsers omit the values if the form is send? That could be a useful trick. But you can't control your input, so the server side must be able to work with the (unwanted) values anyway.
Of course I can add "name" attribute without problems, but it's always bad when a test influences the program. It's like the tail wags the dog.
As Dirk already noted, the ideas of test driven development influence the code in a positive way. That your application is testable is a good thing tm:). In your case, improving webtest to support selection by id, or changing the code and add name attributes will both work to write the test.
I'd better improve the test. I hope once I'll find time for this.
setInputField by id would be cool, no question.
regards, lothar -- Lothar Märkle - loth...@netpioneer.de Netpioneer GmbH - Beiertheimer Allee 18a - D-76137 Karlsruhe Tel: 0721 / 9 20 60 43 Fax: 0721 / 9 20 60 30




