Feature request: Validate.Attribute should return result : Automation API

Feature request: Validate.Attribute should return result

Class library usage, coding and language questions.

Feature request: Validate.Attribute should return result

Postby slavikf » Fri Apr 29, 2011 10:17 pm

Currently Validate.Attribute return void

Please, make it return Boolean result of validation.

If you need use case, here is my scenario:
- I do not want my script to stop, when test case fails, so i use:
Code: Select all
Validate.Attribute (repo.FormSelect.RowN, "RawText", "220", "Record displayed", false);

- However, when test case fails (and only then), i want to save Screenshot to report. If method would return Boolean result i can do it.

I know, i can use TRY ... CATCH construct now, but it would be MUCH simpler and elegant, if i can do it using Boolean value.
User avatar
slavikf
 
Posts: 97
Joined: Mon Sep 13, 2010 10:07 pm
Location: Toronto, Canada

Re: Feature request: Validate.Attribute should return result

Postby Support Team » Sat Apr 30, 2011 1:23 pm

slavikf wrote:Currently Validate.Attribute return void

Actually, all methods of the Validate class already return a boolean value for those overloads which have the "exceptionOnFail" argument, i.e. which you can configure to not throw an exception. For example, see the API documentation for the method you are referring to in your post:
http://www.ranorex.com/Documentation/Ra ... bute_8.htm

So the functionality you requested already exists :D

Regards,
Alex
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 4842
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria


Return to Automation API

Who is online

Users browsing this forum: No registered users and 0 guests