Page 1 of 1

Can't detect a button

Posted: Thu Jun 21, 2012 4:09 pm
by Bticino
Hello,

I require your help because we want to test a tool we are developing in our enterprise but I want to click on a button but it seems undetectable.

When I try with the TRACK button, the application is never detected and it always gives me Window form
Image

Then manually, I'll show you the tree in Ranorex Spy to show you the button is undetectable.
The frame highlighted size is reduced before showing the "Project" button I want to click on at the bottom.
Look at the evolution of the highlighted frame size when I go from parent to children node :


Element 'uiPanelProperties'
Image
Element 'uiPanel8'
Image
Container 'uiPanel8Container'
Image

Do you have a solution or a tip to locate this button "Project" ? I have the impression that Spy detects what is under "Property" and "Project" frame but it can't switch between the two.

Re: Can't detect a button

Posted: Fri Jun 22, 2012 11:42 am
by Support Team
Hi,

thanks for posting the screenshots.
Please also provide us a snapshot of your application under test holding the button which cannot be identified correctly.
Following chapter of our user guide will show you how to generate such a snapshot file:
Creating Ranorex Snapshot Files

Thanks...


Regards,
Tobias
Ranorex Tea,

Re: Can't detect a button

Posted: Fri Jun 22, 2012 1:21 pm
by Bticino
Hello,

I was not able to snapshot CTRL+WIN as my application is not detected when I highlight, it only shows Form 'Window' as my first screenshot shows it.
So i right clicked on my application, manually to save the snapshot. I'm always obliged to do things manually and can't do automatic recordings because my application is not well detected. Here is my snapshot.

Re: Can't detect a button

Posted: Mon Jun 25, 2012 2:46 pm
by Support Team
Hi,

Please make sure that the project is not on a network drive and that you have sufficient security privileges, therefore start your AUT and Ranorex as administrator.
Do you have installed the full/extended .Net 4.0 version?
Do you have installed Ranorex with the setup.exe file?
Please also send us some more additional information about your project, it seems that you are using WPF and WinForm elements, is this correct?
Are you using custom controls within your project?
Did you check with the Microsoft UISpy if it is able to identify the elements of your application, because it could be that the UIAutomation implementation for the custom controls is not correct or just not implemented?
It would also be very helpful if you can send us a sample of the used controls or the whole project, this would allow us analyzing the issue much faster, if you want you can send it to our mail address [email protected].

Regards,
Markus
Ranorex Support Team

Re: Can't detect a button

Posted: Fri Jul 13, 2012 4:13 pm
by Bticino
Both software are run as administrator and the requirements are satisfied.

Our application is mainly using WPF and Winform but also Telerik components.
I cannot send you a sample of the application as it is not yet released..

Re: Can't detect a button

Posted: Mon Jul 16, 2012 11:01 am
by Support Team
Hi,

Did you also check with the UISpy if the elements are identifiable via UIAutomation?
The new Ranorex version 3.3.1 is released, please install the new version with the setup.exe file, you will find the link to the actual version on the start page of Ranorex Studio.

Regards,
Markus
Ranorex Support Team

Re: Can't detect a button

Posted: Mon Jul 16, 2012 1:58 pm
by Bticino
Everything is effectively detected by UISpy : When I track mouse he detects every components of my application.

I already updated the software and it didn't change the problem..

Re: Can't detect a button

Posted: Mon Jul 16, 2012 2:32 pm
by Support Team
Hi,

Can you post us a screen shot of the UISpy when your elements are correctly identified?
Did you really check all the mentioned points, in special the one about the .Net version and do you have installed all the prerequisites?
Please also consider that you have to reinstall Ranorex after you have installed the extended version of the .Net 4.0 framework.

Regards,
Markus
Ranorex Support Team

Re: Can't detect a button

Posted: Mon Jul 16, 2012 3:44 pm
by Bticino
Image

Every prerequisites were already installed before installing ranorex as every computer have a .NET ready environment with Visual Studio 2010 installed.

Here is one part of the program installed :
Image

Re: Can't detect a button

Posted: Tue Jul 17, 2012 12:16 pm
by Support Team
Hi,

Thanks for the screenshots!

The screenshot of the UISpy shows quite the same objects as Ranorex Spy did:
SpyVSUISpy.jpg
One thing which is definitely wrong is the ScreenLocation/Location/ScreenRectangle of the elements, that is also why Ranorex has troubles to get a screenshot of the elements and why you have troubles to record/track them, as they are set to "-32000; -32000".
Maybe you can check if the developers have set the Location attribute of the elements to a wrong value?
In your case it would also be helpful if you send us a Snapshot of the UISpy (File -> Save Snapshot from Current View...)?

Regards,
Markus
Ranorex Support Team

Re: Can't detect a button

Posted: Thu Jul 19, 2012 7:45 am
by Bticino
Remember my problem is a bit vicious. I can effectively find (almost) every controls in view spy by browsing manually.
BUT If I try to use "Track" or the recorder, it will always detect controls as a generic window form taking the whole screen.
See the screenshot : I'm clicking on the Language button and it will highlight the whole screen and not the button and in View Spy it will highlight this Form 'Window' and not my application...
Image
Image

Re: Can't detect a button

Posted: Fri Jul 20, 2012 12:48 pm
by Support Team
Hi,

I know, therefore I asked if you can check if the "Location" attributes of the elements of your application were set to wrong values as they are set to values around "-32000;-32000", which is definitely out of the screen.
You wrote that all elements are identified with Ranorex Spy, so did you know that you can "manually" generate a recording? If not, please take a look at the following blog:
Did you know… that you can manually generate a recording?

Regards,
Markus
Ranorex Support Team