protected String getIdOfKnownElement(AndroidElement element) {
   KnownElements knownElements = getKnownElements();
   if (knownElements == null) {
     return null;
   }
   return knownElements.getIdOfElement(element);
 }
 protected AndroidElement getElementFromCache(String id) {
   KnownElements knownElements = getKnownElements();
   if (knownElements == null) {
     return null;
   }
   return knownElements.get(id);
 }
Exemple #3
0
 protected AndroidElement getElementFromCache(String id) {
   KnownElements knownElements = getKnownElements();
   if (knownElements == null || knownElements.get(id) == null) {
     throw new StaleElementReferenceException("The element with id '" + id + "' was not found.");
   }
   return knownElements.get(id);
 }