Skip to content

Instantly share code, notes, and snippets.

@huguogang
Last active December 24, 2015 05:19
Show Gist options
  • Save huguogang/6749987 to your computer and use it in GitHub Desktop.
Save huguogang/6749987 to your computer and use it in GitHub Desktop.
//this example assuming storeID is known
ArrayList<Object> storeData = (ArrayList<Object>) ((JavascriptExecutor) driver)
.executeScript("return _.pluck(Ext.StoreManager.get(storeID).getRange(), 'data');", storeID);
//get number of rows in the store's data
int numberOfRows = storeData.size();
//get the first row, you are going to see a JSON string on Java console
System.out.println(storeData.get(0));
//get the first row's value for the column "name"
String name = ((Map<String, Object>) storeData.get(0)).get("name").toString();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment