Identification with class property for a window

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
rastek
Posts: 185
Joined: Wed Aug 06, 2014 12:00 pm

Identification with class property for a window

Post by rastek » Wed Sep 03, 2014 11:52 am

Hi
I am testing a web application that is used for calls between clients.

All call is a separate window and Windows Id changes everytime.

First I can detect call status with the path
.//div[#'call_status']

When I make a second call, first window goes back and another window comes up

Now I need to get call status of this new window
Now status of first call is `On Hold` and status of second call is `On Call`
However I can not detect status of new window, If I use same approach I detect status of old window that goes back actually.

I tried to recognize new window with its class property but I couldn't..

if I give class name such as this path
.//div[@class='call_window outgoing']//div[#'call_status']
can not find anything..
I see Ranorex can not Identify with class property ? Is Identification with class property possible anyway?

I am sending a screenshot. As you can see from my spy window capture, only class and windows id is unique, and window id is dynamic, everything other is same.

I hope experienced testers can help me..

Thanks,
Rasim.
You do not have the required permissions to view the files attached to this post.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Identification with class property for a window

Post by Support Team » Thu Sep 04, 2014 3:25 pm

Hi Rastek,
In general, all attributes which are listed in the Path Editor of Spy can be used to identify your elements.
The screenshot below shows all attributes which are available to identify a button in the windows calculator application.
Spy_WinCalc.png

In this path editor you can easily modify and adapt the path the way you want. It is also possible to select two or more attributes to build your path. This will ensure that the path gets more unique.
In the screenshot you attached I can see that the Class attribute has the value “call_window first hold zoom_out_1”. Have you already tried this path:
.//div[@class=’call_window first hold zoom_out_1’]
Otherwise I would suggest to send a snapshot to [email protected]. This will help us to find a path which fits your needs.

Regards,
Markus (S)
You do not have the required permissions to view the files attached to this post.

rastek
Posts: 185
Joined: Wed Aug 06, 2014 12:00 pm

Re: Identification with class property for a window

Post by rastek » Thu Sep 04, 2014 7:29 pm

Hi
Thanks for reply. There are different class names for the windows . I already tried few of them including call_window outgoing and call_window first hold zoom_out_1 but both did not work. I will send a snapshot as soon as possible.

So you say I can identify the object with every propert I see on the spy for the object ?
I am not sure whether it is

There is a weighting issue for object recogniton which I see in one of your pages but that is for repository.
Actually when I import my recordings to another tool I dont use repository.

Thanks,
Rasim.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Identification with class property for a window

Post by Support Team » Fri Sep 05, 2014 2:23 pm

Hi,

of course it is possible to use the attributes which are shown in the spy to identify the elements.
As you can see in the screenshot below, it is also possible to combine several attributes.
Spy_WinCalc_Attributes.png
Please ensure that the path is still unique after editing.

May I also ask you to take a look at our blog or our User Guide which describes the Ranorex Path in more detail?

Regards,
Markus (S)
You do not have the required permissions to view the files attached to this post.

rastek
Posts: 185
Joined: Wed Aug 06, 2014 12:00 pm

Re: Identification with class property for a window

Post by rastek » Fri Sep 19, 2014 6:51 pm

But with class propery it is not working.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Identification with class property for a window

Post by Support Team » Mon Sep 22, 2014 4:18 pm

Hi rastek,

Can you please send us a Ranorex Snapshot file of your application in order to analyze the issue in more detail?
Maybe there is another property in order to identify the elements uniquely.

Regards,
Bernhard