Ranorex attepts to click on off screen items.

Bug reports.
User avatar
artur_gadomski
Posts: 207
Joined: Mon Jul 19, 2010 6:55 am
Location: Copenhagen, Denmark
Contact:

Ranorex attepts to click on off screen items.

Post by artur_gadomski » Thu Mar 03, 2011 7:51 am

Hi
While analyzing strange failed night run I noticed that the window of AUT was partially off screen and that button that was supposed to be clicked was not visible. Unfortunately Ranorex moved the mouse as far as it could and clicked anyway. Button that at that time was under mouse cursor opened a new unexplored and unexpected window in our application and caused failed run. When trying it out a bit it seems that Ranorex clicks regardless of where the mouse actually is. Since mouse can't move outside the left border of the screen and for some reason application windows can this can cause strange behavior. Would it not be possible to check if mouse position is withing rectangle of object it wants to click before actually clicking?

Steps to reproduce:
1. Edit WinFormsTest sample form Ranorex so that: You have a Delay after application window is opened and clicking actually start. You stop or pause after Clicking on 'tabPage2' (step 2 of recording).
2. Run test, when application window is opened move it off left side of the screen so that 'tabpage2' is not visible but 'Image' tab is.
Happens:
When automation resumes it will click on 'Image' tab.
Should happen:
Automation fails because it can't click on 'tabpage2'

With all this said, I think it's only a minor bug, took me 6 months and new developer to stumble upon it and it could be easily solved on our side by either maximizing the aut window, or moving it to (1,1) (or whatever is top left with multiple displays).

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Ranorex attepts to click on off screen items.

Post by Support Team » Thu Mar 03, 2011 4:27 pm

Hi,

I've added a feature request to our internal bug tracking tool to extend our ensure visible method. This method then will set the UUT to position "1;1" so that all elements are reachable for the cursor and this shouldn't happen anymore.

Regards,
Peter
Ranorex Team
.
Image

Pavlo
Posts: 43
Joined: Fri Dec 30, 2011 10:55 am

Re: Ranorex attepts to click on off screen items.

Post by Pavlo » Sun Mar 18, 2012 5:16 pm

Hi

I've found same issue on my AUT.
When I developed tests on my laptop with additional display and all forms from AUT were fully visible ( AUT and Ranorex were opened on that additionsl display with screen resolution 1920x1080) and develpoment of pilot automation project went well.

But when I was presenting my pilot automation project to director of QA and CEO - test that runs smoothly on my "development environment", failed on demo because demo was shown only on laptop (without additional display) with screen resolution 1366x768.

Attached is snapshot example button that were not clicked during demo :(
One more bad things - ranorex treats this button as "visible" :(
Even with screen location: 1363,645 this button is no visible because this screen part does not belong to AUT, this is windows' taskbar part.
Attachments
invisible_button.rxsnp
(80.62 KiB) Downloaded 183 times
invisible_button.PNG
invisible_button.PNG (24.35 KiB) Viewed 1397 times

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Ranorex attepts to click on off screen items.

Post by Support Team » Mon Mar 19, 2012 4:37 pm

Hi,
Pavlo wrote:Attached is snapshot example button that were not clicked during demo
One more bad things - ranorex treats this button as "visible"
Even with screen location: 1363,645 this button is no visible because this screen part does not belong to AUT, this is windows' taskbar part.
Sorry for your troubles.
According to your screenshot you have maximized your window and the button is out of screen. Also I cannot see any scroll-bars in your application that Ranorex can ensure that the item is visible. Is the size of your window set to a fix minimum size? For me it look likes your application cannot perform with smaller resolutions. Do you have the autohide seeting for the taskbar enabled?

Regards,
Peter
Ranorex Team
.
Image