Forum Discussion

indubousely's avatar
indubousely
Occasional Contributor
12 years ago

Drop Down Selection Issue


Hi SmartBear Team

I am Using Test complete in Windows desktop application, in this application i have many drop down and grid controls and i am facing couple of issues.
1) while recording the project I used script method and selected one value from the drop down, when i do play back i want to choose another option from the drop down, but here its taking the co-ordinates(Position values) so i can't give the drop down options names directly, also its not displaying ClickItem() method, Only the Click(),ClickR() and ClickM() Methods are available. please give me valuable feedback ASAP.

2)While recording the application i have entered values in the Grid one by one from top to bottom, but on play back its not re-entering the values. Value get filled only for the first cell after it moved to next one and shows object doesn't exists error.

please tell me how to overcome these two problems.

4 Replies

  • indubousely's avatar
    indubousely
    Occasional Contributor
    Below mentioned script is recorded by test complete for desktop application,In this I need to select particular item from the drop down. please write your suggestions.

    Sub Test1
    Dim invMetrics_Paris
    Dim splashFrm
    Dim textEdit
    Dim mainFrm
    Dim accountsFrm
    Dim layoutControl
    Dim gridLookupEditControl
    TestedApps.TestedApp1.Run
    Set invMetrics_Paris = Aliases.InvMetrics_Paris
    Set splashFrm = invMetrics_Paris.SplashFrm
    Set textEdit = splashFrm.txtLogin
    Call textEdit.TextBoxMaskBox.Drag(49, 6, -55, 0)
    Call textEdit.SetText("demouseraonca")
    Set textEdit = splashFrm.txtPassword
    Call textEdit.TextBoxMaskBox.Click(22, 12)
    Call textEdit.SetText("perform{su}")
    splashFrm.btnLogin.ClickButton
    Set mainFrm = invMetrics_Paris.MainFrm
    Call mainFrm.BarDockControl.DockedBarControl.ClickItem("Accounts")
    Set accountsFrm = mainFrm.MdiClient.AccountsFrm
    Set layoutControl = accountsFrm.LeftDockPanel.DockPanelContainer.LeftLayoutControl
    Call layoutControl.cboClient.Click(170, 12)
    Set gridLookupEditControl = invMetrics_Paris.PopupGridLookUpEditForm.GridLookupEditControl
    Call gridLookupEditControl.Keys("de")
    Call gridLookupEditControl.Click(118, 90)
    Call layoutControl.gcAccounts.Click(107, 127)
    Set layoutControl = accountsFrm.MainlayoutControl
    Call layoutControl.toolbarContainer.DockedBarControl.ClickItem("Edit")
    Call layoutControl.TabControlAccounts.tabBasicInfo.BasicInfoLayoutControl.cboAsset.Click(47, 10)
    Call invMetrics_Paris.PopupLookupEditForm.Click(34, 40) -------- "In this line of code I want to Select the Particular Item from the drop down "
    invMetrics_Paris.XtraMessageBoxForm.SimpleButton.ClickButton
    End Sub
  • paul_scroce's avatar
    paul_scroce
    Frequent Contributor
    Does the cboAsset object display the ClickItem method?

    If it does then try editing the line to

    Call layoutControl.TabControlAccounts.tabBasicInfo.BasicInfoLayoutControl.cboAsset.ClickItem("Item name")


    Then you can remove the next line using co-ordinates

    Call invMetrics_Paris.PopupLookupEditForm.Click(34, 40)

     


  • hlalumiere's avatar
    hlalumiere
    Regular Contributor
    You could also focus the control, use the up/down keys and check the .SelectedItem property.
  • indubousely's avatar
    indubousely
    Occasional Contributor
    Thanks Hugo Lalumiere  UP/DOWN key thing is working fine, but i need the give the particular item name through script, how can i give, if there is any way to get it. please help me.