Contributions
Re: Can anyone please help me with using Tuples in TestComplete with Python
Hibaxatob. If you dont mind, Can you please tell me how to do the same using Excel via COM. I have tried with this: def Control_Actions1(): Excel = Sys.OleObject["Excel.Application"] Excel.Workbooks.Open("C:\\Users\\TESTPC\\Desktop\\Cochlear_CSEP2.xlsx").Sheets.Item["TC_Nav_ SP_Implant"] RowCount = Excel.ActiveSheet.UsedRange.Rows.Count ColumnCount = Excel.ActiveSheet.UsedRange.Columns.Count Log.Message(RowCount) Log.Message(ColumnCount) tests_run=[] for i in range(0,RowCount): for j in range(0,ColumnCount): if(Excel.Value["TCID"] == "Ctrl_ID"): test=tests_to_run.append(test_case_container.Value["TC1138"]) test_case_container.Next() return tests_to_run3.2KViews0likes4CommentsHow to get row count and column count using DDT driver?
Hi, Can anyone please help me with how to get row count and column count of an excel using DDT driver. I dont want to store the excel into variables of TestComplete. But i need to get the row count and column count using DDT. Can anyone please help me with this?1.4KViews0likes1Comment- 1.9KViews1like0Comments
- 1.9KViews0likes0Comments
How to click after finding an object
Hi All, I need to perform some action after finding an object using Find, FindAll or FindChildren methods. Can anyone please explain how to go about this? Like click on the object after finding it using Find or FindAll methods. I have gone through the smartbear website for find and findAll. But it didnt help. I tried with this code: def clickControlID(): TestedApps.Sound_PE.Run() Delay(5000) Login=Sys.Process("SoundPE").WinFormsObject("DialogLogin") clkLogin=Login.FindAllChildren("WinFormsControlName","buttonOK",20) clkLogin.Click() I am getting the error for this code as: AttributeError: 'SafeArrayWrapper' object has no attribute 'Click'Solved1.9KViews0likes4CommentsRe: Can anyone please help me with using Tuples in TestComplete with Python
baxatobThank you for the answer. But I am getting the result as [] I tried with following ways 1.def test(): A=[get_test_suite(test_case_container)] Log.Message(str(A[0])) 2.def test(): A=[get_test_suite(test_case_container)] Log.Message(A[0]) 3.def test(): A=[get_test_suite(test_case_container)] Log.Message(str(A[0][0])) 4.def test(): A=[get_test_suite(test_case_container)] Log.Message(A[0][0]) But i am not getting the values in Result. Can you please help me with this Baxatob.3.2KViews0likes7CommentsRe: Can anyone please help me with using Tuples in TestComplete with Python
baxatobI know to print the values from the list. my_list = [1, 2, 3, 4, 5] my_list[0] == 1 my_list[-1] == 5 But i am not able to print using the script which you have sent test_case_container = DDT.ExcelDriver("C:\\TestCases.xls", "Sheet1") def get_test_suite(test_case_container): tests_to_run = [] # creating an empty list while not test_case_container.EOF(): if test_case_container.Value["ExecutionFlag(Y/N)"] == "Y": tests_to_run.append(test_case_container.Value["TCID"]) test_case_container.Next() return tests_to_run When i call this method inside a script i will get the result as ['TC1138', 'TC996', 'TC1135', 'TC1138', 'TC1140']. Now i need to fetch the first value from the list. I have tried with this code: test_case_container = DDT.ExcelDriver("C:\\Users\\TESTPC\\Desktop\\TestDoc.xlsx", "Sheet1", True) def get_test_suite(): tests_to_run = [] # creating an empty list while not test_case_container.EOF(): if(test_case_container.Value["Execute-Flag(Y/N)"] == "Y"): test=tests_to_run.append(test_case_container.Value["TCID"]) test_case_container.Next() return tests_to_run def test(): Log.Message(str(get_test_suite())) A=[get_test_suite()] Log.Message(str(A[1])) But i am not able to fetch the values. Can you please help with this problem?3.1KViews0likes9Comments