For my tests, i need to access all entries of a menu at my application.
Whenever a menu entry should be clicked or moved to, the mouse moves to the entry in a diagonal way. It starts its way by default at the center of a control.
Is there a possibility to set the order of direction, to make the mouse moving first down and then right (First example)? Or make the mouse moving first right and then down (Second example)?
First example:
[Menu][Menu][Menu] <= MenuBar
[Verylongmenuentry]
Moving to [Verylongmenuentry] causes a selection of a wrong menu, because the mouse "touches" the red [Menu] and opens it. To avoid this, a moving order (down, right) should be configurated.
Second example:
[Menu]
[Menuentry]
[Submenu] => [Submenuentry1]
[Menuentry] _[Submenuentry2]
[Menuentry] _[Submenuentry3]
[Menuentry] _[Submenuentry4]
Moving to [Submenuentry4] causes a selection of a wrong menuentry, because the mouse "touches" the red [Menuentry] and closes the opend [Submenu]. To avoid this the moving order should be right and then down.
Configuration order of direction for mouse movement
Re: Configuration order of direction for mouse movement
I had a similar issue and the following worked for me -
Change the location where you click on the menuitem -
menuitem.click(location.centerRight)
and speed up the mouse move time -
adapter.DefaultMoveTime = 20
Change the location where you click on the menuitem -
menuitem.click(location.centerRight)
and speed up the mouse move time -
adapter.DefaultMoveTime = 20
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Configuration order of direction for mouse movement
Hi,
You can use sdaly suggestion, or you use a Mouse.MoveTo() Action before you click the sub menu. Then move the mouse for example to the right of the screen for a bit and after the Mouse.MoveTo() finish click the sub menu. You can handle this by code or when you are using recording take a look to following documentation
http://www.ranorex.com/support/user-gui ... -keys.html
Regards,
Peter
Ranorex Team
You can use sdaly suggestion, or you use a Mouse.MoveTo() Action before you click the sub menu. Then move the mouse for example to the right of the screen for a bit and after the Mouse.MoveTo() finish click the sub menu. You can handle this by code or when you are using recording take a look to following documentation
http://www.ranorex.com/support/user-gui ... -keys.html
Regards,
Peter
Ranorex Team
Re: Configuration order of direction for mouse movement
Hi sdaly & Peter,
thank you for your answers. I resolved the issue as follows:
Example1:
Christian
thank you for your answers. I resolved the issue as follows:
Example1:
- Click() or MoveTo() with setting a location to move to
- Get width of opened menu
- Get current mouse position
- Move mouse in x-direction = current mouse position in x-direction + offset (related to width of opened menu
- Move mouse in y-direction = current mouse position in y-direction
- Get submenu item
- Click() or MoveTo() submenu item
Christian