pmiley123
13 years agoOccasional Contributor
TestComplete works incorrectly in a grid
Hello,
I cannot get Test Complete to function properly when testing a grid. I will even record a macro which test complete translates as a script, immediately run the same script and it will error. The error occurs when attempting to select a cell within the script. Here is the code (I can include screenshots if neccessary):
CMC = .CMC
grid = CMC.WinFormsObject("frmSurveyIntakeQualify").WinFormsObject("xtraScrollableControlOutreachQualifying").WinFormsObject("gridControlHouseholdMembers")
.Desktop.Keys "[Tab]"
grid.Keys("[Tab]1")
grid.ClickNewRowCell("HOH") '*****it errors here when attempting to select a cell. the previous tabs are workarounds*****
grid.ClickNewRowCell("Income Code")
I cannot get Test Complete to function properly when testing a grid. I will even record a macro which test complete translates as a script, immediately run the same script and it will error. The error occurs when attempting to select a cell within the script. Here is the code (I can include screenshots if neccessary):
Set CMC = Aliases.CMC
CMC = .CMC
Set grid = CMC.WinFormsObject("frmSurveyIntakeQualify").WinFormsObject("xtraScrollableControlOutreachQualifying").WinFormsObject("gridControlHouseholdMembers")
grid = CMC.WinFormsObject("frmSurveyIntakeQualify").WinFormsObject("xtraScrollableControlOutreachQualifying").WinFormsObject("gridControlHouseholdMembers")
Sys.Desktop.Keys "[Tab]" 'Select "Person" workaround
.Desktop.Keys "[Tab]"
Call grid.Keys("[Tab]1")
grid.Keys("[Tab]1")
'Call grid.Keys("[Tab]") 'hoh
'Call grid.Keys(" ")
'Call grid.ClickNewRowCell("Person")
'Call grid.TextEdit.TextBoxMaskBox.Keys("1")
Call grid.ClickNewRowCell("HOH") '*****it errors here when attempting to select a cell. the previous tabs are workarounds*****
grid.ClickNewRowCell("HOH") '*****it errors here when attempting to select a cell. the previous tabs are workarounds*****
Call grid.ClickNewRowCell("Income Code")
grid.ClickNewRowCell("Income Code")