cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to handle a dynamic object

SOLVED
Highlighted
Contributor

Not able to handle a dynamic object

I am working on Xamarin based iOS application. I am not able to handle a dynamic window object. I am trying to logout from application. As soon as I click on SignOut, an alert comes up for confirmation of signing out. I am not able to click on Yes though my script. When I  Map this Yes Action object it does not get recognized as one parent window object has dynamic index. (Object in red)

Aliases.Device.processQaA360.Window(8).AlertView().ScrollView(1).ActionView(0)

Above window object does not have enough properties to be able to get recognised uniqly. I have also added a screenshot of spy of this object. 

 

Even Find child  method is not working for me in this case. I am giving parent as "Aliases.Device.processQaA360" and then using Findchild method to retreive "ActionView(0)" object but  I am getting object not found not matter what depth i go to (I have used depth as 12).

 

can anyone pls suggest me a resolution to this.

6 REPLIES
Contributor

Re: Not able to handle a dynamic object

Contributor

Re: Not able to handle a dynamic object

Issue is not with AlertView but a parant window of it which has a dynamic index and there are not enough properties available to map it uniqly.In below shown heirarchy, objects in Green are constant but object in red is dynamic at times it is window(4) at time window(5) .I have also tries using wildcard "*" in name mapping but that does not work either.Can anyone please let me know how to handle it.

 

Aliases.Device.processQaA360.Window(8).AlertView().ScrollView(1).ActionView(0)

Contributor

Re: Not able to handle a dynamic object

Okay, in the screenshot I can see the basic properties. Did you check for advanced properties? Anything helpful there?

https://support.smartbear.com/testcomplete/docs/testing-with/exploring-apps/object-browser/view-mode...

 

And if '*' wildcard does not work, I think parent 'processQaA360' object has multiple 'Window' child objects.

If so did you check is there any difference in their properties?

The one you need may have certain unique value but others may have it different one like with 'Exists', 'Visible'.

 

Community Hero

Re: Not able to handle a dynamic object

Hi,

 

a) In the Object Browser and Object Spy click the 'View more members' link that is above the Properties/Methods tabs. This will provide you with more properties with the chance that you will be able to find those that are stable and unique enough to make it possible to identify the problematic window.

 

b) It would help to see your code that does not work.

Below assumes that you did not modify Aliases hierarchy and it matches Namemapping one.

.FindChild() method must work, but you must call it for the processQaA360 object and specify search properties for AlertView.

Another option is to enable the Extended Find option for the AlertView object in the Namemapping (this column may be hidden and you should select Field Chooser context menu option to display it) and delete the Window(8) object from Namemapping so that all its child objects move up one level. See https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/exte... for more details.

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Contributor

Re: Not able to handle a dynamic object

Thanks a lot Alex. Finally Find child method worked with approach mentioned in Point b in your answer.

Contributor

Re: Not able to handle a dynamic object

Thanks Saravana for taking time out to answer my query.

Watch a new Video
Top Kudoed Authors