package com.mumux.androidtesting.actions.impl; @SuppressWarnings("unused") public class CheckAction { /* @SuppressWarnings("unused") public CheckAction(String id) { args.add(id); } @Override public void run(UiAutomatorTestCase uiAutomatorTestCase) throws ActionException { System.err.println("run check " + args.get(0)); //UiObject uiObject = new UiObject(new UiSelector().descriptionContains(args.get(0))); //UiObject uiObject = new UiObject(new UiSelector().resourceId("com.orange.orangeetmoi.d:id/smartauthent_explicit_id_login")); UiObject uiObject = new UiObject(new UiSelector().descriptionContains(args.get(0))); System.err.println("exists? " + uiObject.exists()); try { System.err.println("is Checked? " + uiObject.isChecked()); if (!uiObject.isChecked()) { System.err.println("check"); } } catch (UiObjectNotFoundException e) { e.printStackTrace(); throw new ActionException(); } } */ }