Ask a Question

How can I declare a object that value change every time.

SOLVED
kaiiii
Regular Contributor

How can I declare a object that value change every time.

First please check below object

Set obj = page.FindChild("TextNode",  "vglwaterresistance_2_SystemDefinedSaveButton_label")

 

Here, Textnode value changed every time when run application

chnaged like below

vglwaterresistance_3_SystemDefinedSaveButton_label

vglwaterresistance_4_SystemDefinedSaveButton_label

 

I have highlight the changes.. how can i declare a object that accept any value.

1 ACCEPTED SOLUTION

Accepted Solutions
tristaanogre
Community Hero

Re: How can I declare a object that value change every time.

It's possible you may need to select different property/value pairs to identify the object. 

 

Also.... I'm not sure you have the correct syntax for FindChild.  The first parameter should be the property name (ObjectType, Caption, etc) the second parameter should be property value.  It looks like you have two values instead.  Please review the syntax of the FindChild at 

 

https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/common-for-all/findch...


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

3 REPLIES 3
tristaanogre
Community Hero

Re: How can I declare a object that value change every time.

Replace the number with an *.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
kaiiii
Regular Contributor

Re: How can I declare a object that value change every time.

@tristaanogre  I had tried but it's not working.

 

 

tristaanogre
Community Hero

Re: How can I declare a object that value change every time.

It's possible you may need to select different property/value pairs to identify the object. 

 

Also.... I'm not sure you have the correct syntax for FindChild.  The first parameter should be the property name (ObjectType, Caption, etc) the second parameter should be property value.  It looks like you have two values instead.  Please review the syntax of the FindChild at 

 

https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/common-for-all/findch...


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

cancel
Showing results for 
Search instead for 
Did you mean: