Forum Discussion

megha_gambhire's avatar
megha_gambhire
Contributor
13 years ago

unable to Select Grid control items

In my application, ther is Grid control which has few items in it. I want to select few of them > Right click > Some operation.



The control has following properties.



Name- WinFormsObject("Gridcontrol")


CtrlFullClassName=Devexpress.ExtraGrid.GridControl


WcolumnCount=2

WRowCount= 17




When I played it,

7 Replies

  • Hi All, can any one help me . Its Urgent. I had few days left with Trial version. Before that I need to to check if i can Automate maximum no of Test cases with test complete.So We can have final decision with Test Complete.
  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)
    Hi Megha,



    Your original question seems to be unfinished. What happened when you played back the test, and what exactly is the issue?



    TestComplete actually supports XtraGrid controls and records and plays back actions over them using the DevExpressXtraGrid test object methods and properties. For example, multiple row selection and a subsequent right-click can be automated similarly to this:

    Call grid.ClickRowIndicator(0)

    Call
    grid.ClickRowIndicator(1, skCtrl)



    Call
    grid.ClickRowIndicatorR(1)




    By the way, if you need more time to evaluate TestComplete, you can request a trial extension.
  • Sorry Helen , for incomplete information.



    When i played the script ( here it is Keyword Script) nothing happen when the script came at that certain point.



    Actually I am trying to select few row values from the Grid and then clicking on the 'Add Group' button.



    As i have Uncheck the' Stop on Error; it just wait for the next object to enable.



    Also As u mention of the Grid.ClickRowIndicator method, I checked it for my Grid and it does not displayed this method.

    Instead it displayed ClickCellXY method when I recorded the script. But when played It stuck at this point.
  • Hi Helen, I found the ClickRowIndicator Method when double click in Keyword view. Previously i verified it in Object spy in which it does not display the ClickRowIndicator method.



    I chnaged it to ClickRowIndicator method. But still it does not select the required rows.



    Also How to use below method

    grid.ClickRowIndicator(1, skCtrl) ? I guess this is for Control Key which enable to select multiple selection. But in Keyword I didnt find skCtrl ?


  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)
    Hi Megha,



    When i played the script ( here it is Keyword Script) nothing happen when the script came at that certain point.

    ...

    I chnaged it to ClickRowIndicator method. But still it does not select the required rows.

    Without seeing your test, it's difficult to say what might be wrong. Could you please zip your test project (with the log of the failed test run) and attach it here? If you don't want to post it on a public forum, you can send it privately to our Support Team using this form.



    Previously i verified it in Object spy in which it does not display the ClickRowIndicator method.
    Most likely, you selected another object in the Object Spy, for example, a helper panel inside the grid - that's why, you didn't see this method. However, if you record clicks on row indicators, TestComplete will record ClickRowIndicator applied to the grid.



    I guess this is for Control Key which enable to select multiple selection. But in Keyword I didnt find skCtrl ?
    Yes, skCtrl specifies a click with the Control key pressed, which is typically used for multiple item selection.

    You can input the skCtrl value directly in your keyword test. To do this, simply click the operation's parameter list twice, and when the in-place editor appears, enter the row number followed by a comma and skCtrl -- see the attached screenshot.
  • Hi Helen, It still not working.



    We have sent our sample application ( Free vsersion) to Smart bear team. But no reply from them.
  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)
    Hi Sudhir and Megha,



    Our support engineers are analyzing your application and your queries, and we will get back to you soon with explanations and solutions.



    Regarding the issue with multiple item selection that's being discussed in this thread:

    You didn't say how exactly you had selected the grid items during the test recording - using Ctrl- and Shift-clicks, by dragging the mouse pointer, or in a different way. And without seeing your recorded test and the error messages from the test log, I can't guess what may be wrong in the recorded test or during the playback. Maybe the actions were recorded incorrectly, or another object interfered with your test.



    If you're having issues with the test recording, I'd recommend adding the corresponding operations to the test manually instead. I've attached a short video that demonstrates how to add operations for multiple item selection to XtraGrid. I hope this helps!