Hi there,
I'm quite new with Ranorex.
Can you tell me how to clear an input?
Actually I have a login form and the login and password and pre-filled up. I need to clear those 2 inputs to input something new.
Thanks for your support.
Antoine.
how to clear an input
Re: how to clear an input
Hi,
What I'm doing in such cases is sending Ctrl+A shortcut to given input, which basically selects the content of input and then the selection can be replaced with Key Sequence action. Hope this helps?
What I'm doing in such cases is sending Ctrl+A shortcut to given input, which basically selects the content of input and then the selection can be replaced with Key Sequence action. Hope this helps?
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: how to clear an input
Hi Antoine,
Here are three different options for clearing an input field.
Ned
Here are three different options for clearing an input field.
- 1. Using {BACK} several times until the input is cleared. This is the most human like automation, but typically not recommended since the field length can vary.
2. Using a CTRL+A Key Shortcut action to select all text prior to entering your own text. This is the best practice as it is still human like and safe to use on most input fields.
3. Add a Set Value InnerText to nothing, or the text you need input. This is the not human like at all but get the job done efficiently. This action may not work on all input fields since some applications have specific key listeners and need to delete the text in a specific way. If this is the case, you will need to find the what your application is expecting, then have Ranorex duplicate this behavior.
Ned
You do not have the required permissions to view the files attached to this post.
Re: how to clear an input
On password fields I ended up right-clicking in a field and using Select All from the context menu before hitting Delete or Backspace or whatever it is I do. If Select All isn't enabled I know the field is empty.