Results 1 to 4 of 4

Thread: How to access grid store

  1. #1
    Sencha User
    Join Date
    Mar 2010
    Posts
    3
    Vote Rating
    0
      0  

    Default Answered: How to access grid store

    How do I get access to a grid store? I was trying to do something like this :

    expect(ST.grid('gridpanel').get('store').length).toBe(9);

    But this doesn't work. Any suggestions?

  2. Is this for a WebDriver or In-Browser scenario?

    For In-Browser, you can use the Ext JS APIs to get the Store from a grid directly.

    Otherwise, for WebDriver, if you want to check the number of records in the grid's store, you can do something like this:

    Code:
    ST.grid('[title=Cell Editing Plants]')
        .execute(function(grid) {
            return grid.getStore().getTotalCount();
        })
        .and(function(future) {
            expect(future.data.executeResult).toEqual(36);
        });
    One other tip - if you want to get the record values from a particular grid row, we also have a getRecord API.

  3. #2
    Sencha - Sales Team daniel.gallo's Avatar
    Join Date
    Apr 2009
    Location
    Redwood City, CA
    Posts
    154
    Answers
    15
    Vote Rating
    22
      0  

    Default

    Is this for a WebDriver or In-Browser scenario?

    For In-Browser, you can use the Ext JS APIs to get the Store from a grid directly.

    Otherwise, for WebDriver, if you want to check the number of records in the grid's store, you can do something like this:

    Code:
    ST.grid('[title=Cell Editing Plants]')
        .execute(function(grid) {
            return grid.getStore().getTotalCount();
        })
        .and(function(future) {
            expect(future.data.executeResult).toEqual(36);
        });
    One other tip - if you want to get the record values from a particular grid row, we also have a getRecord API.
    Daniel Gallo
    Senior Solutions Architect
    Sencha Inc.

  4. #3
    Sencha User
    Join Date
    Mar 2010
    Posts
    3
    Vote Rating
    0
      0  

    Default

    Sorry, forgot to mention that this is for WebDriver scenario. And yes, that solution of yours worked , many thanks!

    In-Browser method is much easier as you have Ext JS APIs but I have found it to make browser crash or freeze often. Also I have seen it to utilize lots of processing power. Is this something you have encountered on your end or have heard about from others?

  5. #4
    Sencha - Sales Team daniel.gallo's Avatar
    Join Date
    Apr 2009
    Location
    Redwood City, CA
    Posts
    154
    Answers
    15
    Vote Rating
    22
      0  

    Default

    More resources will be used as tests are running. Do you see any error messages logged in Sencha Studio when the browser crashes? Do the crashes happen at the same point in the test run each time? Are you using Embedded or standalone Selenium server?

    If you continue to experience problems, I'd recommend trying tests on a different web app, e.g. try the test suites in this repository to see if you see the same kind of crashes/freezing: https://github.com/DanielGallo/AssetRegisterTests
    Daniel Gallo
    Senior Solutions Architect
    Sencha Inc.

Similar Threads

  1. Replies: 2
    Last Post: 24 May 2011, 7:20 AM
  2. How to access nested XML in a grid store
    By ospillane in forum Ext: Discussion
    Replies: 0
    Last Post: 20 May 2011, 2:58 AM
  3. How To Access Grid ComboBox Store To Load
    By sportda in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 17 Oct 2010, 2:07 AM
  4. How to access a Grid's store (all values) when using Pagination?
    By jmhwhite2001 in forum Ext GWT: Discussion
    Replies: 2
    Last Post: 25 Feb 2010, 10:30 AM
  5. Replies: 1
    Last Post: 13 Feb 2008, 8:25 AM

Posting Permissions

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