Hi Team,
I am using ranorex 6.0 for testing desktop applications using c sharp. I use data driven testing by linking the recording with a simple data connector. I use the following function SelectValue
public void SelectValue(string dataval)
{
Keyboard.Press(dataval);
Keyboard.Press("{Enter}");
}
for selecting the value from the drop down lists.
When I used this function while testing my application in Windows 8 OS, there we no issues while selecting values from the drop down lists, which ranorex will take from the data sheet. But when I test my Windows 7 application, it sometimes go to the right value, then selects the wrong value, that is not mentioned in the data sheet. This happens only for few drop downs, for example, if there are 25 drop downs, this function selects the right value 20 times and fails 5 times. Please let me know how to improve the function so it selects the right value all the time.
Selecting a value from the drop down list
-
- Posts: 2
- Joined: Tue Nov 15, 2016 4:25 am
Selecting a value from the drop down list
Last edited by PraveenPriya21 on Tue Nov 15, 2016 11:58 am, edited 1 time in total.
Re: Selecting a value from the drop down list
Hi,
At first, please update Ranorex with latest 6.1.1. Ranorex 6.0 contained several major bugs, so it;s better to use latest 6.1.1. At second, please upload a Ranorex snapshot of the failing listbox(es). Ideally, take the snapshot both on Win 7 and 8. Then add "PrepareFocus" method before entering dataval string. And finally, instead of "Press" use "PressKeys" method (for dataval entry). This should help with sending correct keys to correct element. Use Press method just for sending shortcuts. Hope this helps?
At first, please update Ranorex with latest 6.1.1. Ranorex 6.0 contained several major bugs, so it;s better to use latest 6.1.1. At second, please upload a Ranorex snapshot of the failing listbox(es). Ideally, take the snapshot both on Win 7 and 8. Then add "PrepareFocus" method before entering dataval string. And finally, instead of "Press" use "PressKeys" method (for dataval entry). This should help with sending correct keys to correct element. Use Press method just for sending shortcuts. 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
-
- Posts: 2
- Joined: Tue Nov 15, 2016 4:25 am
Re: Selecting a value from the drop down list
Hi,odklizec wrote:
At first, please update Ranorex with latest 6.1.1.
I am using Ranorex 6.1.0 (updated)
How to add this function? I am new to coding. Please specify the logic behind adding the PrepareFocus function. if it is a build in function, please specify the reference to be added to use it.Then add "PrepareFocus" method before entering dataval string.
I am getting an error that Ranorex.Keyboard does not contain definition for PressKeysAnd finally, instead of "Press" use "PressKeys" method (for dataval entry).
You do not have the required permissions to view the files attached to this post.
Re: Selecting a value from the drop down list
Hi,
By the "Snapshot" I meant Ranorex Snapshot, not a screenshot Please follow the steps described here:
http://www.ranorex.com/support/user-gui ... files.html
As for Focus and PressKeys methods, you don't have to code anything. Just drag&drop the drown list element from repository to recording of your choice and then from the appeared menu select "Invoke Action" >> "Focus" (for Focus) and "KeySequence" (for sequence of keys). Hope this helps?
By the "Snapshot" I meant Ranorex Snapshot, not a screenshot Please follow the steps described here:
http://www.ranorex.com/support/user-gui ... files.html
As for Focus and PressKeys methods, you don't have to code anything. Just drag&drop the drown list element from repository to recording of your choice and then from the appeared menu select "Invoke Action" >> "Focus" (for Focus) and "KeySequence" (for sequence of keys). 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