Hi Team,
When I use: Keyboard.Press(Keys.LMenu) /* alt key */ it tries to access the File menu of the application.
Please let me know what can be done for this?
Br,
Phanee
Alt button accesses File menu in the application
-
- Posts: 7
- Joined: Tue Sep 13, 2016 1:38 pm
Re: Alt button accesses File menu in the application
Hi Phaneendra,
Unfortunately, I'm not exactly sure what you're trying to achieve.
Could you please give us a bit more information about your issue?
Best regards,
asdf
Unfortunately, I'm not exactly sure what you're trying to achieve.
Could you please give us a bit more information about your issue?
Best regards,
asdf
-
- Posts: 7
- Joined: Tue Sep 13, 2016 1:38 pm
Re: Alt button accesses File menu in the application
Hi,
We have a WPF application with graphical interface.
In the graphical interface, when I switch between different commands, we use the windows ALT key functionality to switch between scenarios.
I am trying to automate the functionality with ranorex. And, in the code to do this process, I have used:
Keyboard.Press(Keys.LMenu) to achieve this behavior.
But, when I do this, the automation process access the 'File' menu of the WPF application.
I am unable to solve what's going wrong.
Br,
Phaneendra.
We have a WPF application with graphical interface.
In the graphical interface, when I switch between different commands, we use the windows ALT key functionality to switch between scenarios.
I am trying to automate the functionality with ranorex. And, in the code to do this process, I have used:
Keyboard.Press(Keys.LMenu) to achieve this behavior.
But, when I do this, the automation process access the 'File' menu of the WPF application.
I am unable to solve what's going wrong.
Br,
Phaneendra.
Re: Alt button accesses File menu in the application
This is the expected behavior from Windows applications. If you press and release the ALT key, the focused application's main menu will be opened. This is Windows OS functionality, not Ranorex.
Shortcuts usually aren't...
-
- Posts: 7
- Joined: Tue Sep 13, 2016 1:38 pm
Re: Alt button accesses File menu in the application
Thanks,
yes, I understand it's the default windows behavior.
But, If I use the similar steps with the instant recording from ranorex studio, the above problem doesn't appear.
If I use this code sample in my project, the problem occurs.
I am keen to know, if the ranorex studio uses some settings to suppress these default windows actions.
Best regards,
Phanee.
yes, I understand it's the default windows behavior.
But, If I use the similar steps with the instant recording from ranorex studio, the above problem doesn't appear.
If I use this code sample in my project, the problem occurs.
I am keen to know, if the ranorex studio uses some settings to suppress these default windows actions.
Best regards,
Phanee.
Re: Alt button accesses File menu in the application
Ranorex does not do anything to the default Windows settings unless you specifically direct it to.
In your case, I would right-click the working version's action and select "View Code". This will show you what the actual code-behind looks like so you can get an idea of how Ranorex is using the method call.
In your case, I would right-click the working version's action and select "View Code". This will show you what the actual code-behind looks like so you can get an idea of how Ranorex is using the method call.
Shortcuts usually aren't...
-
- Posts: 7
- Joined: Tue Sep 13, 2016 1:38 pm
Re: Alt button accesses File menu in the application
Yes, I did the similar way how you've suggested (copying the text displayed under code-behind), but it doesn't help.
I am not sure how can I solve this. But, I see something ranorex does with the delays.
infact, If I add more delays, it works perfect.
Br,
Phanee.
I am not sure how can I solve this. But, I see something ranorex does with the delays.
infact, If I add more delays, it works perfect.
Br,
Phanee.
Re: Alt button accesses File menu in the application
Ah, yeah, timing issues are probably 75%, or more, of the problems in getting test automation to work right.
Shortcuts usually aren't...
-
- Posts: 7
- Joined: Tue Sep 13, 2016 1:38 pm
Re: Alt button accesses File menu in the application
Hmm, we should try to normalize these with some delays(hopefully a trail & error method).
Br,
Phanee
Br,
Phanee