Pages

Tuesday, September 11, 2007

Form Post Parameters - requires Name - cannot use ID

I have a script written using the Ruby library Watir. I couldn't upgrade it to VSTS because the form fields cannot be accessed by ID in the VSTS Web Test.

There is a testing exercise on Elisabeth Hendrickson's site: http://www.testobsessed.com/exercises/triangle.html

Here's what the Ruby script does
1) click draw with nothing in the sides and verify the triangle type is Invalid
2) enter the same value in all 3 sides, click draw, and verify the triangle type is Equilateral
3) enter values to generate a Right triangle, clcik draw, and verify triangle type is Right
4) enter values to generate a Scalene triangle, clcik draw, and verify triangle type is Scalene
5) enter values to generate a Isosceles triangle, clcik draw, and verify triangle type is Isosceles
6) enter non numeric values in all 3 sides, clcik draw, and verify triangle type is Invalid

The command in Watir is ie.text_field(:id, "side1").set("eee")

In VSTS the Name of the Form Post Parameter is required to set the value.

6 comments:

Anonymous said...

Hello! I'm newbie in Internet, can you give me some useful links? I know only about Yahoo [url=http://yahoo.com]Yahoo[/url] http://yahoo.com Yahoo

Anonymous said...

It is extremely interesting for me to read that post. Thank author for it. I like such themes and everything that is connected to this matter. I definitely want to read a bit more soon.

Anonymous said...

I will not acquiesce in on it. I regard as polite post. Expressly the title-deed attracted me to study the unscathed story.

Anonymous said...

Genial fill someone in on and this post helped me alot in my college assignement. Say thank you you on your information.

Anonymous said...

It is certainly interesting for me to read that article. Thanks for it. I like such topics and everything connected to this matter. BTW, try to add some pics :).

Anonymous said...

i'm new... expectancy to post round more time after time!