Random text string input to a textbox

Ask general questions here.
stevelink
Posts: 10
Joined: Thu Jan 10, 2008 6:15 am
Location: Texas
Contact:

Random text string input to a textbox

Post by stevelink » Thu Jun 12, 2014 4:23 pm

Greetings!
I am running a script (Ranorex version 5.0.3.18203) that enters data (via Key Sequence) such as First name, Last name, into textboxes.
Code:
Key Sequence {LShiftKey down}P{LShiftKey up}

Key Sequence {LShiftKey down}i{LShiftKey up}

RanoreXPath: /dom[@domain='localhost:xxxx']//input[#'LastName']

Repository Item: LastName

However, we are seeing unscripted ("random") text being entered into the Last name field, such as "You should be able to syn". This script was running successfully yesterday, and there were no changes made to either the Last name object code in the script or in the application. Thank you.

stevelink
Posts: 10
Joined: Thu Jan 10, 2008 6:15 am
Location: Texas
Contact:

Re: Random text string input to a textbox

Post by stevelink » Thu Jun 12, 2014 6:20 pm

Addendum to this question "Random text string input to a textbox"...We found that the textbox control got the "random" text from the Windows clipboard. So, rather than inputting hard-coded text via Key Sequence, the Last name control input the string stored in the Windows clipboard (shown in the Web Element tagValue of the adapter). Any thoughts on how/why this occurred would be greatly appreciated! Thank you.

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Random text string input to a textbox

Post by krstcs » Thu Jun 12, 2014 6:31 pm

For a key-sequence, you don't need to add key-codes for SHIFT if it is only for upper-case characters. Just use the upper-case character in your sequence:

Keyboard -> Sequence -> "PI" (without the quotes (")) ==> Enters "PI" in the text box
or
Keyboard -> Sequence -> "pi" ==> Enters "pi" in the text box
Shortcuts usually aren't...

stevelink
Posts: 10
Joined: Thu Jan 10, 2008 6:15 am
Location: Texas
Contact:

Re: Random text string input to a textbox

Post by stevelink » Thu Jan 15, 2015 5:14 am

Thank you, Ranorex Support! We now data-drive our test cases via an excel data connector (data parameterization). After creating appropriate module variables, and then binding them to their respective excel data columns, Ranorex does the rest seamlessly and robustly!