
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
@Override public HashMap<Integer, HashMap<Integer, String>> GetUITableText(WebElement _locator) { // TODO Auto-generated method stub List<WebElement> o_col_rows = _locator.findElements(By.tagName("tr")); int i_row_count = o_col_rows.size(); List<WebElement> o_col_clms; int i_clm_count; String cell_text; //HashMap<Integer,HashMap<Integer,String>> o = new HashMap<Integer, HashMap<Integer, String>> result_map= new HashMap<Integer,HashMap<Integer,String>>(); HashMap<Integer, String> o_col_map=null;; for (int i=0;i<i_row_count;i++) { o_col_clms = o_col_rows.get(i).findElements(By.tagName("td")); i_clm_count = o_col_clms.size(); for(int j=0;j<i_clm_count;j++) { cell_text = o_col_clms.get(j).getText(); //System.out.println(cell_text); o_col_map.put(j, cell_text); } result_map.put(i, o_col_map); } return result_map; }//end method |