Lambis
13 years agoNew Contributor
OR operand in FindChild method
Hello there,
I am using FindChild and Find methods in most of my scripts in the project I am currently working on and I want to know if there is a way to set in the PropValues array a condition under the OR operand. Since I know Find* methods of TC are working only in the AND philosophy. For example, a script I am using is looking for an OK button in the whole page and searches like this:
PropArray = Array ("SlFullClassName", "SlObjectName");
The application I am testing has different implementations of the OK button. Hence I would like to include these different implentations in a single FindChild statement, in order not to call FindChild many times in a script and increase its execution time. I would like to search the objects that are Buttons and their "SlObjectName" property has the value OKButton OR btnOK. Is there any way to include this OR conditions into a single FindChild statement?
I am new in the forum and I don't know whether the question I am raisin here has been answered before.
I am using FindChild and Find methods in most of my scripts in the project I am currently working on and I want to know if there is a way to set in the PropValues array a condition under the OR operand. Since I know Find* methods of TC are working only in the AND philosophy. For example, a script I am using is looking for an OK button in the whole page and searches like this:
var PropArray = new Array ("SlFullClassName", "SlObjectName");
PropArray = Array ("SlFullClassName", "SlObjectName");
var ValuesArray = new Array ("System.Windows.Controls.Button", "OKButton");
var Item = Parent.FindChild(PropArray, ValuesArray, 100);
The application I am testing has different implementations of the OK button. Hence I would like to include these different implentations in a single FindChild statement, in order not to call FindChild many times in a script and increase its execution time. I would like to search the objects that are Buttons and their "SlObjectName" property has the value OKButton OR btnOK. Is there any way to include this OR conditions into a single FindChild statement?
I am new in the forum and I don't know whether the question I am raisin here has been answered before.