Created a UserCode module for a testcase, added the excel datasheet to datasource (databinding), now i want get those values UserCode Action.
Below is my code :
WebElement Password = webDocReg.FindSingle(".//form/div[2]/input[@id='password']", 30000);
Password.Focus();
Password.PressKeys("password");
now i want the value of password from databinding.
Please help its very urgent for me
Get Data from datasource(databinding)
-
- Posts: 21
- Joined: Wed Dec 07, 2011 2:54 pm
- Location: India
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Get Data from datasource(databinding)
Hi,
follwoing chapter of our user guide will explain how to generate a module variable which can be bound to your data source:
Using Variables with Code Modules
Regards,
Tobias
Ranorex Support Team
follwoing chapter of our user guide will explain how to generate a module variable which can be bound to your data source:
Using Variables with Code Modules
Regards,
Tobias
Ranorex Support Team
-
- Posts: 21
- Joined: Wed Dec 07, 2011 2:54 pm
- Location: India
Re: Get Data from datasource(databinding)
The code in the topic is shown with repository, but i'm not adding any thing to repository.
Can't i get the values without using repository.
Please help me out
Can't i get the values without using repository.
Please help me out
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Get Data from datasource(databinding)
The section in the Ranorex User Guide Tobias posted covers both user code modules with and without a repository. Although I recommend using a repository for the RanoreXPath to your password input tag.akommalapati wrote:The code in the topic is shown with repository, but i'm not adding any thing to repository.
Just create a new variable within the user code module (right-click) and then replace all occurrences of the "password" string with the generated property.
Regards,
Alex
Ranorex Team