Results 1 to 8 of 8

Thread: Double click a row in a grid

  1. #1

    Default Double click a row in a grid

    Hi,

    I've been working on Sencha test for few weeks for a web application. The version I'am using is 2.0.2.9.
    My question: How would I double click a row in a grid with particular value. The codes that I have tried are given below.

    code 1:
    ST.grid("#grid_Id").rowWith('ProgramName','000test program').cellAt(3).click();

    code 2:
    ST.play([
    { type: "dblclick", target: "#grid_Id=> [data-recordindex="0"] [data-columnid="gcParticipantId"]", x: 60, y: 14 }
    ]);

    With code 1 we can do only single click, but we can specify conditions for that row.
    With code 2 we can double click the row by mentioning the record index other than condition.

    Could you please help me to find code to double click a row by specifying conditions for that row?

    Thanks in advance.

  2. #2
    Sencha User
    Join Date
    Mar 2017
    Posts
    45

    Default

    Bumping this thread. Is there a way to double-click a row in a grid?

  3. #3

    Default

    This one worked for me:

    ST.play([

    { type: "dblclick", target: ST.grid("#grid_id").rowWith('Column_dataIndex', 'value_to_search').cellWith('dataIndex', 'Column_dataIndex') }
    ]);

  4. #4
    Sencha User
    Join Date
    Mar 2017
    Posts
    45

    Default

    Thanks for the reply but that doesn't seem to work for my use case.

    Is there a method that will double-click on a row in a grid?

  5. #5
    Sencha - Sales Team daniel.gallo's Avatar
    Join Date
    Apr 2009
    Location
    Redwood City, CA
    Posts
    331
    Answers
    51

    Default

    The method discussed above should work. Are you using an In-Browser or WebDriver scenario?

    Although we don't yet have an explicit double-click API, you can run a double-click action against a component or a grid row like this:

    Code:
    var row = ST.grid('[title="My Grid"]')
                .rowWith('text', 'car');
            
    ST.play([
        { type: 'dblclick', target: row }
    ]);
    Daniel Gallo
    Senior Solutions Architect
    Sencha Inc.

  6. #6
    Sencha User
    Join Date
    Mar 2017
    Posts
    45

    Default

    Thanks for the clarification, Daniel. I was using the 'dblclick' incorrectly in my WebDriver scenario.

  7. #7
    Sencha - Sales Team daniel.gallo's Avatar
    Join Date
    Apr 2009
    Location
    Redwood City, CA
    Posts
    331
    Answers
    51

    Default

    As a follow-up to this - there will be a new "doubleClick" API in the next release (2.2.1). This new API is included in the latest nightly build (2.2.1.13), available from the support portal later tonight. Example usage:

    Code:
    ST.grid('#mygrid')
        .rowAt(3)
        .cellAt(2)
        .doubleClick();
    Daniel Gallo
    Senior Solutions Architect
    Sencha Inc.

  8. #8
    Sencha User
    Join Date
    Mar 2017
    Posts
    45

    Default

    Great news! Thanks for the follow-up.

Similar Threads

  1. Replies: 5
    Last Post: 2 Jun 2015, 5:49 AM
  2. Replies: 0
    Last Post: 28 Sep 2011, 12:47 PM
  3. Double single click and double click in editor grid problem
    By Zanisimo in forum Ext 3.x: Help & Discussion
    Replies: 7
    Last Post: 22 Jan 2011, 12:05 PM
  4. Question on double click and single click event handlers within grid
    By NotChris in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 27 Feb 2008, 11:51 AM
  5. Grid - Single click vs Double click select
    By amackay11 in forum Ext 1.x: Help & Discussion
    Replies: 13
    Last Post: 4 Jun 2007, 5:16 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •