Created
October 11, 2013 06:03
-
-
Save huguogang/6930210 to your computer and use it in GitHub Desktop.
get ExtJS grid selected data, and use JUnit assertion to verify the result
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String gridQuery = "viewport #grid1"; | |
String js = "return Ext.ComponentQuery.query('" + gridQuery | |
+ "')[0].getSelectionModel().getSelection()[0].data"; | |
@SuppressWarnings(value="unchecked") | |
Map<String, Object> row = (Map<String, Object>)((JavascriptExecutor) _driver).executeScript(js); | |
assertThat("Project name", row.get("ProjectName").toString(), equalTo("Expected Project Name")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment