How to set a Repository Variable

Ask general questions here.
schemer1
Posts: 16
Joined: Mon Feb 11, 2013 12:05 pm

How to set a Repository Variable

Post by schemer1 » Tue Feb 12, 2013 5:50 pm

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

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: How to set a Repository Variable

Post by Support Team » Fri Feb 15, 2013 9:06 am

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