Tuesday, May 16, 2006

Selenium IDE and ASP.NET validators

After reading Jess Tedder's praise of Selenium IDE, I went to give it a try. I liked it, thought it was very easy to use and very effective.

There were two problems I had with it: one, that there doesn't appear to be a way to stop a test once it is in progress without closing the IDE (a problem if you accidentally get yourself into a wait state for something that will never happen), and two, that there doesn't seem to be a straightforward way to test for the appearance of ASP.NET validator control indicators and messages on the page.

Validator indicators and messages are rendered on the page, but initially have their style.visibility attribute set to hidden. Indicators appear at the site of the validator control in the page, while messages are commonly dynamically collected displayed in validation summary controls, elsewhere on the page. Selenium has methods to test for the presence of text on a page, but since the messages and indicators are indeed on the page but not necessarily visible, you get a lot of false positives. I tried using methods that looked for attributes of specific elements, but ran into problems because it isn't always possible to predict what the id will wind up being for a control on an ASP.NET page, depending on what it's nested in and how the markup was generated. Indeed, some controls (like the <li> error message elements that are added to validation summary controls during validation) don't even get their own ids. Finding the control by its location rather than its id can be problematic in ASP.NET because since the error messages are added dynamically, you don't necessarily know where in the sequence the list entry with your message will be.*

I'm sure eventually someone will write a Selenium extension that will take care of this -- a text-on-page test that tests for the visibility of the text. It would be nice if it also allowed expressions for the search text. I might even try it myself once I get past my home programming backlog.

* Yes, ideally you'll know exactly which messages to expect and can predict where in the sequence the message you're testing for will fall. But the test you're running might be just for one function generating one message, and not concerned with nor wishing to specify what other validation messages might be visible.

40 Comments:

Blogger Jess Tedder said...

Hey Ann! I'm glad you liked the post. Selenium supports two "asserts" that will help with your visible problem. "assertVisible" and "assertNotVisible" I've used both when working with the vaildation controls.

5/19/2006 8:27 AM  
Blogger ram chinna said...

REALLY VERY EXCELLENT INFORMATION. I AM VERY GLAD TO SEE YOUR BLOG FOR THIS INFORMATION. THANKS FOR SHARING. KEEP UPDATING.
Best Digital Transformation Services | DM Services | Austere Technologies

3/22/2018 1:07 AM  
Blogger masi said...

Very good informative article. Thanks for sharing such nice article, keep on up dating such good articles.

NO.1 APP DEVELOPMENT SERVICES | MASSIL TECHNOLOGIES

3/26/2018 1:26 AM  
Blogger AUSTERO said...

What an interesting information, Thanks for sharing.

Best Mobility Services | Austere Technologies

3/28/2018 2:41 AM  
Blogger AUSTERO said...

wow...nice blog, very helpful information. Thanks for sharing.

Best IT Security Services | Austere Technologies

4/09/2018 5:10 AM  
Blogger SachinVarshan said...

I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.
aws training in Chennai

4/12/2018 7:44 AM  
Blogger raj kumar said...

Those guidelines additionally worked to become a good way to
recognize that other people online have the identical fervor like mine
to grasp great deal more around this condition.

white label website builder

4/14/2018 4:14 AM  
Blogger Inigo joseph said...

Thanks a lot very much for the high your blog post quality and results-oriented help. I won’t think twice to endorse to anybody who wants and needs support about this area.
java training in chennai

4/18/2018 1:35 AM  
Blogger mithra R said...

Thank you a lot for providing individuals with a very spectacular possibility to read critical reviews from this site. great blog.selenium training in chennai

4/19/2018 8:18 AM  
Blogger ajay ak said...


Thanks for the useful information of software testing courses, give more updates on software testing development, First time I visit your blog really nice, I bookmark your blog here after a daily visit. Learn software testing course in Chennai

4/27/2018 12:33 AM  
Blogger priyanka said...

I and my friends were going through the nice, helpful tips from the blog then the sudden came up with an awful suspicion I never expressed respect to the website owner for those secrets.
Best Python training Institute in chennai

5/02/2018 6:22 AM  
Blogger desh said...

Wow...What an excellent informative blog, really helpful. Thank you.
Best Commerce College in Hyderabad | Avinash College Of Commerce

5/28/2018 7:11 AM  
Blogger austere said...

Great article, really very helpful content you made. Thank you, keep sharing.

Software Testing | Austere Technology

6/01/2018 3:44 AM  
Blogger satheesh sutharapu said...

Excellent information you made in this blog, very helpful information. Thanks for sharing.

chartered accountant | Avinash college of commerce

7/02/2018 7:42 AM  
Blogger avinash said...

Nice blog with excellent information. Thank you, keep sharing.

chartered accountant course in Hyderabad | Avinash college of commerce

7/05/2018 2:04 AM  
Blogger avinash said...

Great article, really very helpful content you made. Thank you, keep sharing.

Best Degree Colleges Hyderabad | Avinash College of Commerce

7/23/2018 1:02 AM  
Blogger sandy said...

Thank you for sharing this valuable information. But get out of this busy life and find some peace with a beautiful trip book Best Andaman Tour Package

7/26/2018 3:35 PM  
Blogger Austere said...

Very good informative blog, keep sharing.

Best junior college in Hyderabad | Avinash College of commerce

7/30/2018 6:28 AM  
Blogger satheesh sutharapu said...

Hi Thanks for the nice information its very useful to read your blog. We provide best Block Chain Services

7/31/2018 6:32 AM  
Blogger sandy said...

Thank you for sharing this valuable information. But get out this busy life and find some peace with a beautiful trip. book Andaman family tour packages

8/07/2018 9:19 AM  
Blogger Avinash College Of Commerce said...

Hi Thanks for the nice information its very useful to read your blog. We provide best Finance Training in Hyderabad

8/10/2018 7:07 AM  
Blogger sandy said...

Thank you for sharing this valuable information. But get out this busy life and find some peace with a beautiful trip. book ANDAMAN HOLIDAY PACKAGES @ 35999

8/20/2018 8:41 AM  
Blogger sandy said...

Thank you for sharing this valuable information. But get out this busy life and find some peace with a beautiful trip. book CHEAP ANDAMAN PACKAGES @9999

8/20/2018 8:48 AM  
Blogger sandy said...

Thank you for sharing this valuable information. But get out this busy life and find some peace with a beautiful trip. book Andaman Tourism

8/22/2018 9:20 AM  
Blogger sandy said...

Thank you for sharing this valuable information. But get out this busy life and find some peace with a beautiful trip. book Best Travel Agency In India

8/22/2018 9:20 AM  
Blogger Austere said...

Good information.

B.com Integrated Courses | Avinash College of commerce

8/23/2018 6:18 AM  
Blogger sandy said...

Hi Thanks for the nice information its very useful to read your blog. We provide About Best Software Development Services

8/23/2018 8:30 AM  
Blogger sandy said...

Thank you for sharing this valuable information. But get out this busy life and find some peace with a beautiful trip. book Andaman Tourism

8/23/2018 8:53 AM  
Blogger sandy said...

Thank you for sharing this valuable information. But get out this busy life and find some peace with a beautiful trip. book ANDAMAN TOUR PACKAGE@14599/

8/30/2018 9:15 AM  
Blogger sandy said...

Hi Thanks for the nice information its very useful to read your blog. We provide best Find All Isfs Courses

9/03/2018 6:27 AM  
Blogger sandy said...

Hi Thanks for the nice information its very useful to read your blog. We provide best Massil Technologies

9/05/2018 8:13 AM  
Blogger Avinash said...

Best informative blog. Thank you.

cima courses in hyderabad | ISFS

9/28/2018 7:38 AM  
Blogger Avinash said...

Excellent informative blog, keep for sharing.

Best System Integration services | Massil Technologies

10/04/2018 1:02 AM  
Blogger Avinash said...

Excellent informative blog, keep sharing.

CA institute in hyderabad | Avinash College of Commerce

10/04/2018 6:07 AM  
Blogger Avinash said...

Excellent informative blog, Thanks for sharing.

cs institutes in hyderabad | Avinash College of Commerce

10/10/2018 1:03 AM  
Blogger Apsara G said...

This information is impressive; I am inspired by your post writing style & how continuously you describe this topic.... Java Training in Chennai | Python Training in Chennai

10/10/2018 3:27 AM  
Blogger satheesh sutharapu said...

Hi Thanks for the nice information its very useful to read your blog. We provide best Association Of Chartered Certified Accountants

10/11/2018 6:50 AM  
Blogger satheesh sutharapu said...

Hi Thanks for the nice information its very useful to read your blog. We provide best Association Of Chartered Certified Accountants

10/11/2018 8:27 AM  
Blogger Avinash said...

Your article gives lots of information to me. Thanks for sharing.
cima courses in Hyderabad | ISFS

10/15/2018 7:47 AM  
Blogger Avinash said...

Thanks for sharing a valuable information to us. Thanks for your blog.

CIMA training institute in Hyderabad | ISFS

10/29/2018 1:11 AM  

Post a Comment

<< Home