@Override public boolean zIsActive() throws HarnessException { // Make sure the Admin Console is loaded in the browser if (!MyApplication.zIsLoaded()) throw new HarnessException("Admin Console application is not active!"); boolean present = sIsElementPresent(""); if (!present) { return (false); } String attrs = sGetAttribute(""); if (!attrs.contains("ZSelected")) { return (false); } return (true); }
/** If the "Login" button is visible, assume the LoginPage is active */ public boolean zIsActive() throws HarnessException { // Make sure the application is loaded first if (!MyApplication.zIsLoaded()) throw new HarnessException("Admin Console application is not active!"); // Look for the login button. boolean present = sIsElementPresent(Locators.zLoginButtonContainer); if (!present) { logger.debug("isActive() present = " + present); return (false); } boolean visible = zIsVisiblePerPosition(Locators.zLoginButtonContainer, 0, 0); if (!visible) { logger.debug("isActive() visible = " + visible); return (false); } logger.debug("isActive() = " + true); return (true); }