Best practices, code snippets for common functionality, examples, and guidelines.
-
ngrishakin
- Posts: 42
- Joined: Fri Oct 04, 2013 9:47 pm
Post
by ngrishakin » Fri Jun 09, 2017 5:14 pm
I'm trying to use Ranorex IDE for the first time. My user name field when I'm trying to login has last login name.
I want to clean this field and type in new user name. Using API I would do just PressKeys("{END}{SHIFT DOWN}{HOME}{SHIFT UP}{DELETE}") and type a new one. Any idea how do I insert the action that would do the same thing? I inserted a screen shot. If I try to type this keys in the field it does not work

Thanks a lot,
Nik
-
Attachments
-

- cleanUserNameField.PNG (41.9 KiB) Viewed 1498 times
-
ngrishakin
- Posts: 42
- Joined: Fri Oct 04, 2013 9:47 pm
Post
by ngrishakin » Fri Jun 09, 2017 5:29 pm
Also instead Step 3 I called a user code:
public void CleanUserName()
{
repo.LoginSalesforce.Username.Element.Actions.Clear();
}
It did not work either
-
odklizec
- Ranorex Guru

- Posts: 6360
- Joined: Mon Aug 13, 2012 9:54 am
- Location: Zilina, Slovakia
Post
by odklizec » Fri Jun 09, 2017 7:06 pm
Hi,
I would suggest to use Ctrl+A shortcut to select everything in username input and then simply replace (or delete) selected text with new one (using key sequence action). Hope this helps?
Pavel Kudrys
Ranorex explorer at
Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
-
Stub
- Posts: 427
- Joined: Fri Jul 15, 2016 1:35 pm
Post
by Stub » Mon Jun 12, 2017 8:16 am
I ended up right-clicking and choosing Select All from the context menu. Hadn't thought about using a keyboard short-cut!