@Override public String getVisibleCellValue(final SpreadsheetColumn column) { super.validateColumn(column); try { final String googleColumnId = ((GSColumn) column).getGoogleColumnId(); final String value = this.listEntry.getCustomElements().getValue(googleColumnId); return value == null ? "" : value; // null is returned when cell is completely empty } catch (Exception e) { e.printStackTrace(); throw new IllegalStateException(e.getMessage()); } }
DataPerEnvironment testEnvHolder = null; for (ListEntry row : rows.getEntries()) { LOGGER.debug("Row is: " + row.getCustomElements().getValue("key") + "value: " + row.getCustomElements().getValue("value")); if (row.getCustomElements().getValue("key").contains("Environment")) { if (testEnvHolder != null) { testEnvironmentMap.add(testEnvHolder); .getValue("value")); row.getCustomElements().getValue("key"), row .getCustomElements().getValue("value")); keyValuePair.put(row.getCustomElements().getValue("key"), row .getCustomElements().getValue("value"));
/** * get ImplementMap frmo the Mapping sheet for single row * * @param row * @return */ private ImplementIMap getMap(ListEntry row) { LOGGER.debug("In preparing the Map:"); return new ImplementIMap.Builder() .withClientEnvironment( getList(row.getCustomElements() .getValue("browsersheet"))) .withTestData(row.getCustomElements().getValue("testdatasheet")) .withRunStartegy( row.getCustomElements().getValue("runstrategy")) .build(); }
/*** * Get the primary data from the Mapping sheet in Google sheet, This would * be fed to MappedValue for refinement */ @Override public Map<String, IMappingData> getPrimaryData() { if (mappingBucket.isEmpty()) { URL listFeedURL; try { listFeedURL = getWorkSheet( GoogleSheetConstant.GOOGLE_MAP_SHEET_NAME) .getListFeedUrl(); ListFeed listFeed = service .getFeed(listFeedURL, ListFeed.class); for (ListEntry row : listFeed.getEntries()) { mappingBucket.put( row.getCustomElements().getValue("methodname"), getMap(row)); } } catch (IOException e) { LOGGER.error(e); } catch (ServiceException e) { LOGGER.error(e); } } return mappingBucket; }
/** * Get single Entry for {@link IBrowserConf} for single row in the Google * sheet * * @param row * @return */ private IBrowserConf getBrowserConfFromRow(ListEntry row) { Map<String, String> browserMap = new HashMap<String, String>(); for (String tag : row.getCustomElements().getTags()) { browserMap.put(tag, row.getCustomElements().getValue(tag)); } return new PrepareDriverConf(browserMap).refineBrowserValues() .checkForRules().get(); }