Ask a Question

FindChild() does not work when selected python as the scripting language but works for VB Script

maheshpandense
Visitor

FindChild() does not work when selected python as the scripting language but works for VB Script

I am using TestComplete v14.20

I have a code in both Python and VB Script.

The findChild code works perfectly fine with VB Script and finds based on the property "idStr". But the same doesnt work with Python.

Syntactically the code is correct but in Python it fails to find the element based on the property "idStr.

 

I am required to use the same property.

VB Code:

arrProperties = Array("idStr")
arrValues = Array(strRole & "_" & strPrivilege)
intSearchDepth = 10

Set Privileges_GetPrivilegeToggle = objPrivilegesTable.FindChild(arrProperties, arrValues, intSearchDepth)

 

Python code:

arrProperties = ["idStr"]
arrValues = [strRole + "_" + strPrivilege]
intSearchDepth = 2000
fn_return_value = objPrivilegesTable.FindChildEx(arrProperties, arrValues, intSearchDepth)

 

In VB it finds the child Privilege Toggle but in Python TestComplete doesnt.

Any solution?

I tried using variables instead of array as there is only single property and value, still it doesnt work.

 

1 REPLY 1
Marsha_R
Community Hero

I suggest asking Support that question directly.  Here's the link:

https://support.smartbear.com/testcomplete/message


Marsha_R
[Community Hero]
____
[Community Heroes] 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. Posts made by [Community Heroes]
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.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
cancel
Showing results for 
Search instead for 
Did you mean: