cancel
Showing results for 
Search instead for 
Did you mean: 

problem to understand Propnames and PropValues

SOLVED
Highlighted
Regular Contributor

problem to understand Propnames and PropValues

TestObj.FindEx(PropNamesPropValuesDepthRefreshTimeout)

hi , in the above line i am facing problem to understand PropNames and PropValues.
How can i put a value into them... please explain with a example
Here i am attaching an object description by using object spy.. pls try to help me according to this attachment. That will help me to learn quickly

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

If you are wanting to use Find or FindEx to search for that object, a suggested bit of code would be something like

 

//parentObject is whatever you have designated as an ancestor of the object you are trying to find

//First parameter is an array of strings representing the names of the properties to be used in the search

//Second parameter is an array of strings representing the respective values of those properties for the search

//Third parameter is the maximum depth down in the hierachy tree, starting with the parent object, to search for the object which has properties of those names with those values


parentObject.Find(['ObjectType', 'ViewId'], ['Layout', 'NO_ID'], 10)

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

9 REPLIES 9
Highlighted
Community Hero

PropNames and PropValues are arrays to send the properties and their respected values for the object you're looking for.  For the screenshot you have given, you've already mapped the component, so there's no need to "find" it.  So, let's go with a different example....  from the same article you found the information on.

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

 

 


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
Highlighted

>>  For the screenshot you have given, you've already mapped the component
Hi, I am writing a script... if i don't have details of target object then how can i work on it.
So please tell me according to the attachment, what are the values can be for PropNames and for PropValues

Highlighted

So please tell me according to the attachment, what are the values can be for PropNames and for PropValues


I think you are not aware what is PropNames and PropValues means here. It can be a single string or it can be a array of property.

 

Based on your screen shot,

 

Ex1:

if your object can be identified with one property then you can do like below,

yourParentObject.Find("JavaClassName","ScrollView",1,true,10000);

 

if your object needs be identified with more then one property then you can do like below,

yourParentObject.Find(["JavaClassName","ObjectType"],["ScrollView","ScrollView"],1,true,10000);

 

FYI, peoples who are helping here are not part SmartBear employee they are as like you.

 

Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”


Extension Available

Highlighted
Regular Contributor

>> peoples who are helping here are not part SmartBear employee they are as like you.

Hi, Sorry  ...i doesn't mean that. I am not well in English.

Highlighted

Not a problem, i thought you might not aware of that Smiley Happy


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”


Extension Available

Highlighted
Regular Contributor

Hi.. i am not getting clear with it.Facing problem again. Please explain me according to this attachment . i am confused a lot


Highlighted
Regular Contributor

Hi.. i am not getting clear with it.Facing problem again. Please explain me according to this attachment . i am confused a lot


Highlighted

If you are wanting to use Find or FindEx to search for that object, a suggested bit of code would be something like

 

//parentObject is whatever you have designated as an ancestor of the object you are trying to find

//First parameter is an array of strings representing the names of the properties to be used in the search

//Second parameter is an array of strings representing the respective values of those properties for the search

//Third parameter is the maximum depth down in the hierachy tree, starting with the parent object, to search for the object which has properties of those names with those values


parentObject.Find(['ObjectType', 'ViewId'], ['Layout', 'NO_ID'], 10)

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

Highlighted

Have you tried to use Record option in TestComplete? if not i just try to record a flow which you are trying to do then you will be able to understand how things are going and try to attend TestComplete 101 training.

 

some videos here

 

If you are strong in TestComplete basic items then your application automation would be much more easier when you look.

 


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”


Extension Available

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors