Hi,
I want to write a value for text box at runtime, how can i do that?
suppose there is a screen with a text box where we can enter value & save record. But while running the test again it gives Duplicate value error to avoid this error i want to increment value of text box each time i run the test. What will be the code?
Assigning values at runtime
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Something like the following code.
Regards,
Christian,
Ranorex Support Team
Code: Select all
// increments the text value 10 times and write it into the textbox
for(int i = 0;i<10;i++)
{
repo.FormGoogle_Minus_GoogleMinus.TextSuche.DoubleClick();
Keyboard.Press("test"+i);
}
Christian,
Ranorex Support Team
-
- Posts: 6
- Joined: Fri Mar 06, 2009 8:10 am
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact: