Page 1 of 1
Get Data from datasource(databinding)
Posted: Wed Dec 07, 2011 3:54 pm
by akommalapati
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
Re: Get Data from datasource(databinding)
Posted: Wed Dec 07, 2011 4:00 pm
by Support Team
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
Re: Get Data from datasource(databinding)
Posted: Wed Dec 07, 2011 4:18 pm
by akommalapati
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
Re: Get Data from datasource(databinding)
Posted: Fri Dec 09, 2011 11:44 am
by Support Team
akommalapati wrote:The code in the topic is shown with repository, but i'm not adding any thing to repository.
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.
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