Page 1 of 1

Data Bind variables(Excel connector) inside Code module

Posted: Mon Oct 16, 2017 8:05 am
by joyarjit
Hi,

I have excel connector with 2 columns(username and password) and multiple rows. Rather recording I want to write code module to type-in values in my text boxes.
Could you please tell me how can we use data bind variable inside the code module, so that with each iteration variable will take different value as mentioned in excel sheet.

Thanks.

Re: Data Bind variables(Excel connector) inside Code module

Posted: Mon Oct 16, 2017 8:18 am
by odklizec
Hi,

You simply have to add code module to TestCase or SmartFolder with created data connector of your choice. Then simply bind the variables created in CodeModule with those from data connector. If code module variable names are the same as data connector column names, you can simply use AutoBind to bind them.

Re: Data Bind variables(Excel connector) inside Code module

Posted: Mon Oct 16, 2017 4:07 pm
by krstcs
In addition to what Pavel said, you should create the module variables in the code module by right-clicking anywhere in the code editor window and selecting "Insert New Module Variable". This will create a variable that Ranorex can see for binding purposes.

Re: Data Bind variables(Excel connector) inside Code module

Posted: Tue Oct 17, 2017 1:17 pm
by joyarjit
Thanks @krstcs and @ odklizec for the help.