Hi,
In the past I recall using Invoke Action to select an item from a list in a drop down. Now when I attempt to do that, I am not getting the option "Select()" in the Action name. I only get the options Ensure Visible, Focus, get property value, and Invoke method. Am I doing something incorrectly?
Invoke Action - Select
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Invoke Action - Select
Hi armstronghm24,
The available list of invoke actions depends on the element itself. The invoke actions are invoking an available method built into the element. If it is missing, there is no method available on the element to invoke. For select boxes, as an alternative, you can usually use a Set Value action to select the desired value.
If you need further assistance with this, please provide a Ranorex Snapshot of this select box.
I hope this helps!
Cheers,
Ned
The available list of invoke actions depends on the element itself. The invoke actions are invoking an available method built into the element. If it is missing, there is no method available on the element to invoke. For select boxes, as an alternative, you can usually use a Set Value action to select the desired value.
If you need further assistance with this, please provide a Ranorex Snapshot of this select box.
I hope this helps!
Cheers,
Ned
Re: Invoke Action - Select
I would HIGHLY recommend NOT using Invoke action and Set unless you are absolutely sure there is no other way to do what you want.
Not only is this not what a real user would do, in many situations, due to devs not coding events sufficiently, invoke and set do not fire the expected events, so any listeners will not be notified that those actions were taken. For example, if you have a text box that is supposed to do some form of input validation, that validation may not happen if you use Set or invoke. You would need to fire events manually, which, again, is not how a real user would do it.
Unfortunately with select/option tag combo boxes in browsers, the browsers all handle them differently, so Ranorex usually has no way to know where the actual drop-down is and what elements are in it. I have found that typing the value into the select box is usually the most dependable method to have a value selected correctly.
Not only is this not what a real user would do, in many situations, due to devs not coding events sufficiently, invoke and set do not fire the expected events, so any listeners will not be notified that those actions were taken. For example, if you have a text box that is supposed to do some form of input validation, that validation may not happen if you use Set or invoke. You would need to fire events manually, which, again, is not how a real user would do it.
Unfortunately with select/option tag combo boxes in browsers, the browsers all handle them differently, so Ranorex usually has no way to know where the actual drop-down is and what elements are in it. I have found that typing the value into the select box is usually the most dependable method to have a value selected correctly.
Shortcuts usually aren't...