Page 1 of 1

Identification with class property for a window

Posted: Wed Sep 03, 2014 11:52 am
by rastek
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.

Re: Identification with class property for a window

Posted: Thu Sep 04, 2014 3:25 pm
by Support Team
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)

Re: Identification with class property for a window

Posted: Thu Sep 04, 2014 7:29 pm
by rastek
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.

Re: Identification with class property for a window

Posted: Fri Sep 05, 2014 2:23 pm
by Support Team
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)

Re: Identification with class property for a window

Posted: Fri Sep 19, 2014 6:51 pm
by rastek
But with class propery it is not working.

Re: Identification with class property for a window

Posted: Mon Sep 22, 2014 4:18 pm
by Support Team
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