I can run a "PerformClick" from within Ranorex Spy, but...

Ask general questions here.
jrob3rts
Posts: 10
Joined: Fri Sep 06, 2013 10:52 am

I can run a "PerformClick" from within Ranorex Spy, but...

Post by jrob3rts » Wed Sep 18, 2013 4:42 pm

Hi,
If I look at an element in Ranorex Spy, it apprears as an item. I can select "PerformClick" and it clicks as expected. See attachment:
abc1.PNG
abc1.PNG (31.12 KiB) Viewed 1032 times
But if I try to click on this element via the script, it doesn't. It just clicks in the top left corner of the browser.

This element is a line within a bar graph. It opens up another graph, basically drilling down through the detailed data:
abc2.PNG
abc2.PNG (40.12 KiB) Viewed 1032 times
This works fine in IE, but Safari, Chrome and FireFox seems to be causing issues.

I could force a mouse position on the screen, but that is flaky to say the least. I would prefer to be able to identify the first line and select that as I can in IE.

IE, as mentioned works. I have the IE element set as this:
abc3.PNG
abc3.PNG (27.62 KiB) Viewed 1032 times
Any thoughts as I would prefer to have this test automated rather than having to manually do this when the
time comes.

I have, for now added a little bit of code to confirm I can click the item in the other browsers and it works as expected:

Code: Select all

if (BrowserName == "IE") {
        		Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'repo.RapidPortalLogOn.KPISmallChart7GraphId0PlotsetPlot0'", null);
        		repo.RapidPortalLogOn.KPISmallChart7GraphId0PlotsetPlot0.Click(Location.CenterLeft);
        			
        	} else {
        		Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'repo.RapidPortalLogOn.NonIEMiPerformanceGraphItem1'", null);
        		repo.RapidPortalLogOn.NonIEMiPerformanceGraphItem1.Click("680;284");
        	}
However this will no doubt only work for a single client with data that can be clicked at that position.

Thanks in advance.

James

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

Re: I can run a "PerformClick" from within Ranorex Spy, but...

Post by Support Team » Thu Sep 19, 2013 3:03 pm

Hello James,

Could it be that the element is not available when your script tries to click on it?
Could you please check if the element is valid and visible when Ranorex tries to click it?
Please read the following posts in our forum. They are treating a similar issue:

Attempted Mouse click causes move to top left corner
Selecting an item in a ComboBox control

Is it possible to get your application in order to analyze the issue in more detail?
Thank you!

Regards,
Bernhard
.
Image

jrob3rts
Posts: 10
Joined: Fri Sep 06, 2013 10:52 am

Re: I can run a "PerformClick" from within Ranorex Spy, but...

Post by jrob3rts » Fri Sep 20, 2013 4:02 pm

Hi,
It does seem to be available. I have tried to add in some manual waits of say 5 seconds and the same issue occurred.
It almost seems like the element exists, but it not visible to Ranorex, but is when I refresh the Spy.
I do not have a copy of the system with sanitised data right now, and sadly it's not something I can arrange that soon.
I'll continue to have a play and let you know if I find anything of use.
James

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

Re: I can run a "PerformClick" from within Ranorex Spy, but...

Post by Support Team » Mon Sep 23, 2013 2:45 pm

Hello James,

It is hard to analyze the issue, but it seems to be a timing issue, or that the element is not fully loaded when Ranorex tries to click it.
Please let me know if you have more information about that issue.
Thank you!

Regards,
Bernhard
.
Image