How can I get TestComplete to select items in a TMS TPlanner component?
When I tried recording a script, none of the clicks made within the component were recorded.
The object inspector recognizes a VCL object TPlannerMonthView, but I can't use any of the properties or methods. For instance, the wDate and wEndDate properties show in the object inspector as read/write, but any attempt to set them fails. Similarly, the SetSelection method fails.
Does anyone know how to access this component through TestComplete?
Thanks,
Kate
(The code below was recorded by test complete - I've added comments)
procedure Test1;
Test1;
var SIAEMaintenance : OleVariant;
var toolBar : OleVariant;
var TBOEditSIAECalendarHeaderForm : OleVariant;
var comboBox : OleVariant;
begin
SIAEMaintenance := Sys.Process('SIAEMaintenance');
toolBar := SIAEMaintenance.BOEditSIAEOptionsForm.ToolBar;
// clicked add item twice because of slow response time
toolBar.ClickItem(0, false);
toolBar.ClickItem(0, false);
TBOEditSIAECalendarHeaderForm := SIAEMaintenance.BOEditSIAECalendarHeaderForm;
TBOEditSIAECalendarHeaderForm.NameEdit.SetText('Working Days');
comboBox := TBOEditSIAECalendarHeaderForm.cboCalendarType;
// Clicked the combo box twice, too, so I could have a reference into the component
comboBox.Click(137, 12);
comboBox.Click(137, 12);
// Here I clicked twice, did several CTRL-Clicks and some dragging.
// Nothing was recorded until I returned to components outside the TPlanner
TBOEditSIAECalendarHeaderForm.chkActive.ClickButton(cbChecked);
TBOEditSIAECalendarHeaderForm.btnAddSelected.ClickButton;
TBOEditSIAECalendarHeaderForm.OKButton.ClickButton;
end;
;