lbyrne
10 years agoContributor
button bars
The following code was recorded using Test Complete. Set toolkitButtonBar = splitContainer.WinFormsObject("SplitterPanel", "", 1).bbarBroker Call toolkitButtonBar.Click(36, 50) A button call...
What happens if you try
Call toolkitButtonBar.Items.Item_2(0).Click
<script>// function writeContent(){ document.getElementById("container").innerText = document.getElementById("dataIsland").innerHTML; }window.onload = writeContent; // </script>
I get the following error
Object doesn't support this property or method: 'toolkitButtonBar.Items.Item_2(...).Click' Error location: Unit: "HSPAdminTK\Codes Management\Script\Tasks" Line: 202 Column: 1.
Could we see a screenshot of your code?
The following is the code -
Sub AddBillPackageCancel
Log.LockEvents(10)
Set HSP_Meditrac = Aliases.HSP_Meditrac
Call OpenScreen
Set frmBillingPackages = HSP_Meditrac.MDIForm.MdiClient.frmBillingEntities
Set tspBillingEntities = HSP_Meditrac.MDIForm.MdiClient.frmBillingEntities.tspBillingEntities
Call tspBillingEntities.ClickItem("New Billing Entity")
Set gbxDemographics = HSP_Meditrac.MDIForm.MdiClient.frmBillingEntities.splStylesheet.SplitterPanel.splButtonBar.SplitterPanel.splSave.SplitterPanel.gbxDemographics
Call gbxDemographics.txtBillingEntityName.SetText("Autotest Bill Package")
Set mcboEntityType = HSP_Meditrac.MDIForm.MdiClient.frmBillingEntities.splStylesheet.SplitterPanel.splButtonBar.SplitterPanel.splSave.SplitterPanel.gbxDemographics.mcboEntityType
Call mcboEntityType.Click(216, 8)
Call mcboEntityType.Keys("[BS]")
Call HSP_Meditrac.ToolStripDropDown.ToolkitListView.ClickItem("Group", "The Entity mapped to the Billing Entity is a Group")
Set txtBillingEntityDescription = gbxDemographics.txtBillingEntityDescription
Call txtBillingEntityDescription.Keys("This is a Bill Package created by the Autotester")
Set tabControl = HSP_Meditrac.MDIForm.MdiClient.frmBillingEntities.splStylesheet.SplitterPanel.splButtonBar.SplitterPanel2.tabctlBBars
Set toolkitButtonBar = tabControl.tpBBarProperties.bbarProperties
Call toolkitButtonBar.Click(85, 36) ********* This is where I would like to address the button either by index or name instead of x/y coordinates
Set gbxPostingSettings = Aliases.HSP_Meditrac.MDIForm.MdiClient.frmBillingEntities.splStylesheet.SplitterPanel.splButtonBar.SplitterPanel.splSave.SplitterPanel.gbxPostingSettings
Set txtNextBillCutoffDate = gbxPostingSettings.txtNextBillCutoffDate
Call txtNextBillCutoffDate.SetText("15")
Set txtRetroAddLimit = gbxPostingSettings.txtRetroAddLimit
Call txtRetroAddLimit.SetText("3")
Set txtRetroTermLimit = gbxPostingSettings.txtRetroTermLimit
Call txtRetroTermLimit.SetText("6")
Call toolkitButtonBar.Click(51, 60)
Set gbxBillSettings = Aliases.HSP_Meditrac.MDIForm.MdiClient.frmBillingEntities.splStylesheet.SplitterPanel.splButtonBar.SplitterPanel.splSave.SplitterPanel.pnlBillSettings.gbxBillSettings
Call gbxBillSettings.cboDueDatePeriodUnitType.ClickItem("Months")
Call gbxBillSettings.cboPaymentGracePeriodUnitType.ClickItem("Months")
Call tspBillingEntities.ClickItem("Cancel Billing Entity")
HSP_Meditrac.dlgMeditrac.btnYes.ClickButton
Call CloseScreen
End Sub
Set toolkitButtonBar = tabControl.tpBBarProperties.bbarProperties
Call toolkitButtonBar.Click(85, 36) ********* This is where I would like to address the button either by index or name instead of x/y coordinates
Okay, now could you take Object Spy and look at:
tabControl.tpBBarProperties.bbarProperties
and take screenshots of the Extended Properties so we can see?
Thanks