@Override
  public Object executeScript(JSONArray args) {
	  String tagName;
	  JSONObject result = new JSONObject();
	  try {
		  tagName = args.getString(0);
		  Collection<View> currentViews = viewAnalyzer.getViews(getTopLevelViews());
		  for (View view : currentViews) {
				  Object tag = view.getTag();
				  if (tag!=null && tag.toString().equalsIgnoreCase(tagName)) {
					  AndroidNativeElement element =  newAndroidElement(view);
			    	  result.put("ELEMENT", knownElements.getIdOfElement(element));
			  }
		  }
	    } catch (JSONException e) {
        SelendroidLogger.error("Cannot execute script", e);
	    }
	  return result;
  }
This class contains the functionality to find an Android view with the tag name assigned to it
sample usage : WebElement element = (WebElement)webDriver.executeScript("findElementByAndroidTag", "view_test_tag");
@deprecated Please use new implemented extension mechanism
@see <a href="https://github.com/selendroid/selendroid-extension">extension mechanism Docu</a>
selendroid-server/src/main/java/io/selendroid/server/model/internal/execute_native/FindElementByAndroidTag.java