Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » Click at the current mouse position!(New-bie)
Click at the current mouse position! [message #1087355] Thu, 15 August 2013 14:17 Go to next message
James Ball is currently offline James BallFriend
Messages: 5
Registered: June 2013
Junior Member
Hello all,

I'm having trouble with right clicking at a specific point in my external application. I have managed to select the tab by using the 'ub_tbc_selectTab_byValue' however when I try to right click on the tab it moves the cursor into the middle of the mapped box. I need this specific location as my context menu is associated with that specific tab area. Unfortunately, I cannot map the specific tab object that I need; hence the reason for mapping the whole box. However, the context menu for the whole box is different!

So is there any way where I can right click at the specific point of the mouse cursor, without having to map the Test Case with the Component?

Any help would be greatly appreciated!

Many Thanks,
James.

[Updated on: Mon, 19 August 2013 14:15]

Report message to a moderator

Re: Click at the current mouse position! [message #1090427 is a reply to message #1087355] Tue, 20 August 2013 05:47 Go to previous messageGo to next message
Mike Airey is currently offline Mike AireyFriend
Messages: 11
Registered: July 2013
Junior Member
Hi James,

Could ub_grc_clickInComponent do the job? If the tab you need to select is in a regular position within its component, you may be able to specify its location (offset from top left corner, I think) in pixels or percent of the component.

If that worked, I don't know how you'd then access the context menu by indexpath or textpath. Presumably you could click at a position with the context menu 'under' it, but that would make selecting pretty difficult.

So alternatively, maybe ub_grc_selectContextMenuEntryWithPositionSpec_byTextpath would work? It takes the same position parameters as ub_grc_clickInComponent, but also allows you to select from the context menu.


Two caveats: 1) You may have already tried these, and
2) I haven't fully tested any of this stuff. ub_grc_selectContextMenuEntryWithPositionSpec_byTextpath works on a component I have, but that's just a simple button which extends a context menu when pressed. No idea whether tabs will play nice. Anyway, good luck.

Cheers,
Mike
Re: Click at the current mouse position! [message #1091368 is a reply to message #1090427] Wed, 21 August 2013 12:04 Go to previous messageGo to next message
James Ball is currently offline James BallFriend
Messages: 5
Registered: June 2013
Junior Member
Hi Mike,

I have tried both of the options you have suggested and unfortunately neither work in my case.

Although, the ub_grc_selectContextMenuEntryWithPositionSpec_byTextpath was able to open the context menu, I was not able to select anything as the menu disappeared just as quickly as it appeared! Also, if the test was run on a different computer monitor I fear the co-ordinates may be different? Therefore it would not click where I need it (just a thought, not tried it yet!)

Anyway, thanks for your help, really appreciate it.

James.
Re: Click at the current mouse position! [message #1092013 is a reply to message #1091368] Thu, 22 August 2013 08:00 Go to previous messageGo to next message
Mike Airey is currently offline Mike AireyFriend
Messages: 11
Registered: July 2013
Junior Member
No problem. Interesting that you mention running the AUT on a different monitor: are you doing this at the moment? Jubula doesn't like multiple-monitor setups very much. I've always had to position the AUT window and the Jubula ITE window on the same screen in order for testing to work.

If the context menu is appearing, sounds like you're partway there. Are you entering the textpath (e.g. "Context Submenu/Submenu Option") to select from your context menu in the ub_grc_selectContextMenuEntryWithPositionSpec_byTextpath properties?
As far as I know, interacting with context menus by popping them up and then using an external click event does not work; you need to use the specific context-menu-interaction cases.

Cheers,
Mike
Re: Click at the current mouse position! [message #1092144 is a reply to message #1092013] Thu, 22 August 2013 11:37 Go to previous message
James Ball is currently offline James BallFriend
Messages: 5
Registered: June 2013
Junior Member
I'm sorry I should've mentioned this before but i'm using GUIDancer instead of Jubula, hence the dual monitors. I actually programme GUIDancer on a Macbook Pro then run the external application on a Dell Laptop running Windows 8!

I'll give your suggestion another try; i'm sure I did it right the first time, but you never know!

Thanks again,
James

Previous Topic:Importing booleans from Excel to Central Test Data
Next Topic:Running headless in virtual machine
Goto Forum:
  


Current Time: Thu Dec 18 13:34:46 GMT 2014

Powered by FUDForum. Page generated in 0.01658 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software