Page 1 of 1

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

Posted: Wed Sep 18, 2013 4:42 pm
by jrob3rts
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
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
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
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

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

Posted: Thu Sep 19, 2013 3:03 pm
by Support Team
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

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

Posted: Fri Sep 20, 2013 4:02 pm
by jrob3rts
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

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

Posted: Mon Sep 23, 2013 2:45 pm
by Support Team
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