Skip to content

Instantly share code, notes, and snippets.

@angelovstanton
Created November 29, 2015 12:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save angelovstanton/e8877f260d17dd6a28e2 to your computer and use it in GitHub Desktop.
Save angelovstanton/e8877f260d17dd6a28e2 to your computer and use it in GitHub Desktop.
public List<T> GetItems<T>() where T : class
{
string jsToBeExecuted = this.GetGridReference();
jsToBeExecuted = string.Concat(jsToBeExecuted, "return JSON.stringify(grid.dataSource.data());");
var jsResults = this.driver.ExecuteScript(jsToBeExecuted);
var items = JsonConvert.DeserializeObject<List<T>>(jsResults.ToString());
return items;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment