Page 1 of 1

How to set a Repository Variable

Posted: Tue Feb 12, 2013 5:50 pm
by schemer1
Hi,

I need some help in order to assign a value to a variable in my object repository without using an external source.
I have a table cell in my object repository with a fixed 'columnindex' (5) and I've assigned the 'text' attribute to be a variable called $AuthorityName. Therefore when running my test a specific row will be found with the given text in column 5. Which I can click On.
i.e. So basically I was hoping for something along the lines of:
objectrepository.item('text=xxx').click.
I don't think this is possible so I would like to know in code how to pass a given text to this variable. At this stage I would like to be able to do this without binding to a datasource.

Thanks

Re: How to set a Repository Variable

Posted: Fri Feb 15, 2013 9:06 am
by Support Team
Hi,
schemer1 wrote:...objectrepository.item('text=xxx').click.
I don't think this is possible so I would like to know in code how to pass a given text to this variable. At this stage I would like to be able to do this without binding to a datasource...
You can access and set the variable of your repository in code:
objectrepository.AuthorityName= "xxx";
objectrepository.item.click();
Regards,
Tobias
Ranorex Team