Contributions
Interface not supported error while executing scripts through TestComplete
Hi, We are encounteringInterface not supported error while executing scripts through TestComplete. We tried machine restart and TestComplete but still error is coming when we execute scripts. Same scripts are executing fine on another machine with same application build, same TestComplete version, same environment. Could you please let me know why this error occurs. What are possible reasons? Thanks and Regards, Swati Nadage759Views0likes1Commentcompare word docs containing images
Hi, In our application we need to compare word reports which contains charts, tables, some text etc. By which we can do the best comparison. I tried using file checkpoint or File.Compare with diff utility but it's not working fine for graphs in the documents. Could you please tell me what we can use to compare word docs with images? Thanks and Regards, Swati Nadage724Views0likes1Commentneed to read λ from excel file.
We are automating a desktop application where in i need to select 'Indexλ' and 'Valueλ' input on application. These inputs are kept in excel file. For reading i have written fnction using ADODB connection object. For reading such characters what needs to be done? This character is not reconized by the read function. Can somebody please help me on this? Below is my code for reading excel. Function ReadInputFromExcel_MultipleSettings(sheetName, settingName, columnName) On Error Resume Next log.Message "In ReadInputFromExcel_MultipleSettings function" Dim objAdCon, objAdRs Dim arr:arr = Array() log.Message settingName strFileName = Project.Variables.InputFilePath 'strFileName = "C:\Count and Measure\TestExecutionInputs\TestSuite_Driver_Input.xls" log.Message strFileName Call closeExcel 'strSQLStatement = "Select AllFramesAndChanells from [General$] where SettingName='General_def'" strSQLStatement1 = "Select * from ["& sheetName &"$] where SettingName = '"& Trim(settingName) &"'" log.Message strSQLStatement1 Set objAdCon = CreateObject("ADODB.Connection") objAdCon.Open "DRIVER={Microsoft Excel Driver (*.xls)};DBQ="&strFileName & ";Readonly=True" 'objAdCon.Open "DRIVER={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ="&strFileName & ";Readonly=True;" If Err <> 0 Then log.Message objAdCon.State Log.Message Err.Number Log.Message Err.description objAdCon.Close objAdCon = nothing End If Set objAdRs = CreateObject("ADODB.Recordset") objAdRs.Open strSQLStatement1, objAdCon AqUtils.Delay 500 If Err <> 0 Then log.message Err.Number log.Message Err.Description If objAdRs.State = adStateOpen then log.Message objAdRs.State objAdRs.close End If If objAdCon.State = adStateOpen Then log.Message objAdCon.State objAdCon.Close End If objAdRs = Nothing objAdCon = Nothing log.Error "Create Connection Error",Err Exit function End If 'get multiple settings value mulsettings = objAdRs("MultipleSettings").Value log.Message mulsettings If mulsettings = "Yes" then log.message objAdRs("TotalSettings").Value totset = objAdRs("TotalSettings").Value for i=1 to totset 'log.Message i strSQLStatement2 = "Select "& columnName &" from ["& sheetName &"$] where SettingName = '"& Trim(settingName) &"' AND SrNo=" & i & " " 'strSQLStatement2 = "Select "& columnName &" from ["& sheetName &"$] where SettingName = '"& Trim(settingName) &"' AND SrNo= '" & i & "'" 'log.Message strSQLStatement2 Set objRS = objAdCon.Execute(strSQLStatement2) 'log.Message objRS.RecordCount If objRS.EOF Then log.message "No items found" Else objRS.MoveFirst Do While Not objRS.EOF 'log.message objRS.Fields(columnName).value ReDim Preserve arr(Ubound(arr) + 1) arr(UBound(arr)) = objRS.Fields(columnName).value objRS.MoveNext() Loop End If next end if objAdRs.close objAdCon.Close Set objAdRs = Nothing Set objAdCon = Nothing Call closeExcel ReadInputFromExcel_MultipleSettings = arr End function Thanks and Regards, Swati NadageSolved2.8KViews0likes2CommentsRe: clicking on subitem of sysListView control
Thanks Mrunal for your help. Actually I have tried using wItem but it gives error as object required. Also I tried using wchecked but TestComplete doesn't returns state of the checkbox. It gives error as 'the list view items has no checkboxes'. I tried like this. log.message Aliases.SisXV.dlgManageLayouts.SysListView32_ManageLayouts.wChecked(1) or CallAliases.SisXV.dlgManageLayouts.SysListView32_ManageLayouts.wItem(1, 1).Click If you have any example please share with me. I have gone through Smart Bear documentation on this but not getting how to use wItem for my object. Thanks and Regards, Swati3.4KViews0likes0Comments- 3.5KViews0likes2Comments
clicking on subitem of sysListView control
In our desktop application there is a sysListView control. In that control there are checkboxes. I want to click on checkbox. How to do this. I tried clickItem, CheckItem methods. But not able to click on subitem. Please refer to attached image. Could you please guide me in this?3.5KViews0likes6CommentsRe: TestComplete throws weird errors
Hi, I am using Microsoft excel driver available for xlsx as given in below line objAdCon.Open "DRIVER={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ="&strFileName & ";Readonly=True" I have corrected the code which was giving connection error. Once code works fine but next time TestComplete hangs. Excel process remains in memory and TestComplete keeps the file locked. I have closed excel process at the start of script as well as at the end of the script. Also I have closed excel process before reading the input. After TestComplete restart the memory gets released and then TestComplete again works fine. The same problem I found on Smart Bear community. There also they have mentioned that close the TestComplete to release excel process if such issue occurs. Also they have suggested to close excel process that I am already doing. Please refer below threads on Smart Bear Community. http://community.smartbear.com/t5/Functional-Web-Testing/Releasing-Excel-Processes/td-p/78190 http://community.smartbear.com/t5/Functional-Web-Testing/Unable-to-access-the-excel-file/td-p/74792 Here is my code. Please let me know if anything is wrong Function ReadInputFromExcel(sheetName, settingName, columnName) On Error Resume Next Call closeExcel log.Message "In ReadInputFromExcel" log.Message sheetName Dim objAdCon, objAdRs strFileName = Project.Variables.InputFilePath log.Message strFileName strSQLStatement = "Select "& columnName &" from ["& sheetName &"$] where SettingName = '"& Trim(settingName) &"'" log.Message strSQLStatement Set objAdCon = CreateObject("ADODB.Connection") objAdCon.Open "DRIVER={Microsoft Excel Driver (*.xls)};DBQ="&strFileName & ";Readonly=True" 'objAdCon.Open "DRIVER={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ="&strFileName & ";Readonly=True" Set objAdRs = CreateObject("ADODB.Recordset") objAdRs.Open strSQLStatement, objAdCon AqUtils.Delay 1000 If Err <> 0 Then log.message Err.Number log.Message Err.Description objAdRs.close objAdCon.Close objAdRs = Nothing objAdCon = Nothing log.Error "Create Connection Error",Err Exit function End If val = objAdRs(""& columnName &"").Value log.Message val 'return value objAdRs.close objAdCon.Close objAdRs = Nothing objAdCon = Nothing log.Message objAdRs.State log.Message objAdCon.State Call closeExcel ReadInputFromExcel = val End Function966Views0likes1Comment