Using variable in Match Value cell.

Ask general questions here.
valentin
Posts: 27
Joined: Thu Nov 24, 2011 2:47 pm
Location: Moscow

Using variable in Match Value cell.

Post by valentin » Tue Jul 31, 2012 11:01 am

Hi,
Is it possible to verify, if AtributeEqual value , like 'User with login 'Name' already exist', where 'Name' is user variable $UsVar value? I tried to use Validate action with Match Value like (User with login $UsVar already exist) but it has not worked.
A Match Value cell (in Ranorex Studio) can contain only constant or only variable, isn't it? Is it possible to concatenate them?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Using variable in Match Value cell.

Post by Support Team » Tue Jul 31, 2012 2:06 pm

Hi,
A Match Value cell (in Ranorex Studio) can contain only constant or only variable, isn't it?
Yes, this is true. A combination would not make sense here.
Is it possible to concatenate them?
When you write some code to your UserCode, you can of course concatenate strings.

For your concern "AttributeContains" or "AttributeRegEx" would be more suitable.

Kind Regards,
Larissa
Ranorex Support Team
.
Image

valentin
Posts: 27
Joined: Thu Nov 24, 2011 2:47 pm
Location: Moscow

Re: Using variable in Match Value cell.

Post by valentin » Tue Jul 31, 2012 2:38 pm

Support Team wrote:Hi,
When you write some code to your UserCode, you can of course concatenate strings.
Thanks. I used this solution, but wanted to know whether there is an easier way :?:

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Using variable in Match Value cell.

Post by Support Team » Wed Aug 01, 2012 9:45 am

Hi,

It depends what you want to validate?
If you just want to know if a "UserName" already exists, the easiest way is validation with "AttributeContains" and match value $UsVar.

Regards,
Larissa
Ranorex Support Team
.
Image

valentin
Posts: 27
Joined: Thu Nov 24, 2011 2:47 pm
Location: Moscow

Re: Using variable in Match Value cell.

Post by valentin » Thu Aug 02, 2012 10:38 am

Hi
actually I want to validate full text of error message, not only "$UsVar".