@Test public void testIsWindows() throws Exception { boolean windows = Arrays.asList("xp", "nt").contains(env.getOsIdentifier()); assertEquals(env.isWindows(), windows); }
@LogToResult(logClassInstance = false, logArgs = false) public boolean isWindows() { switch (OSUtils.identifyOS()) { case "xp": return true; case "nt": return true; default: return false; } }
Environment implements Action { @LogToResult(logClassInstance = false, logArgs = false) public boolean isWindows() { switch (OSUtils.identifyOS()) { case "xp": return true; case "nt": return true; default: return false; } } }
Environment implements Action { @LogToResult(logClassInstance = false, logArgs = false) public boolean isWindows() { switch (OSUtils.identifyOS()) { case "xp": return true; case "nt": return true; default: return false; } } Environment();  Environment(boolean resumeOnException); }
Environment implements Action { @LogToResult(logClassInstance = false, logArgs = false) public boolean isWindows() { switch (OSUtils.identifyOS()) { case "xp": return true; case "nt": return true; default: return false; } } Environment();  Environment(boolean resumeOnException); static CommandLineResult runCommand(String command); static CommandLineResult runCommand(String command, boolean throwException); @LogToResult(message = "set similarity level", logClassInstance = false) Environment setSimilarity(double similarity); @LogToResult(message = "reset similarity level to default") Environment resetSimilarity(); @LogToResult(logClassInstance = false) Region getRegionFromFocusedWindow(); @LogToResult(logClassInstance = false) Path takeScreenshot(final String filename); @LogToResult(logClassInstance = false) Path takeScreenshotWithTimestamp(final String filenamePostfix, final String optFolderPath, final String optFormat); @LogToResult(message = "sleep and do nothing for x seconds", logClassInstance = false) Environment sleep(Integer seconds); @LogToResult(message = "sleep and do nothing for x seconds", logClassInstance = false) Environment sleep(Double seconds); @LogToResult(message = "sleep and do nothing for x milliseconds", logClassInstance = false) Environment sleepMs(Integer milliseconds); @LogToResult(message = "get string from system clipboard", logClassInstance = false) String getClipboard(); @LogToResult(message = "put to clipboard", logClassInstance = false) Environment setClipboard(String text); @LogToResult(logClassInstance = false) Environment cleanClipboard(); @ModifySahiTimer @LogToResult(message = "paste the current clipboard into the focus", logClassInstance = false) Environment pasteClipboard(); @ModifySahiTimer @LogToResult(message = "copy the current selection to the clipboard", logClassInstance = false) Environment copyIntoClipboard(); @ModifySahiTimer @LogToResult(logClassInstance = false) Environment paste(String text); @ModifySahiTimer @LogToResult(logClassInstance = false, logArgs = false) Environment pasteMasked(String text); @ModifySahiTimer @LogToResult(logClassInstance = false, logArgs = false) Environment pasteAndDecrypt(String text); @ModifySahiTimer @LogToResult(message = "type over system keyboard", logClassInstance = false) Environment type(String text); @ModifySahiTimer @LogToResult(message = "type with pressed modifiers", logClassInstance = false) Environment type(String text, String optModifiers); @ModifySahiTimer @LogToResult(message = "type over system keyboard", logClassInstance = false, logArgs = false) Environment typeMasked(String text); @ModifySahiTimer @LogToResult(message = "type with pressed modifiers", logClassInstance = false, logArgs = false) Environment typeMasked(String text, String optModifiers); @ModifySahiTimer @LogToResult(message = "decrypt and type over system keyboard", logClassInstance = false, logArgs = false) Environment typeAndDecrypt(String text); @ModifySahiTimer @LogToResult(message = "decrypt and type with pressed modifiers", logClassInstance = false, logArgs = false) Environment typeAndDecrypt(String text, String optModifiers); @ModifySahiTimer @LogToResult(message = "press key down", logClassInstance = false) Environment keyDown(String keys); @ModifySahiTimer @LogToResult(message = "press key up", logClassInstance = false) Environment keyUp(String keys); @ModifySahiTimer @LogToResult(message = "interpret and write the following expresion", logClassInstance = false) Environment write(String text); @LogToResult(message = "move mouse wheel down x times") Environment mouseWheelDown(int steps); @LogToResult(message = "move mouse wheel up x times") Environment mouseWheelUp(int steps); @LogToResult(logClassInstance = false, logArgs = false) String decryptSecret(String secret); @LogToResult(logClassInstance = false, logArgs = false) boolean isWindows(); @LogToResult(logClassInstance = false, logArgs = false) boolean isLinux(); @LogToResult(logClassInstance = false, logArgs = false) String getOsIdentifier(); @LogToResult(logClassInstance = false) String getEnv(String key); @LogToResult(logClassInstance = false) String getProperty(String key); @Override boolean getResumeOnException(); @Override ScreenActionLoader getLoader(); @Override RegionImpl getActionRegion(); }
Environment implements Action { @LogToResult(logClassInstance = false, logArgs = false) public boolean isWindows() { switch (OSUtils.identifyOS()) { case "xp": return true; case "nt": return true; default: return false; } } Environment();  Environment(boolean resumeOnException); static CommandLineResult runCommand(String command); static CommandLineResult runCommand(String command, boolean throwException); @LogToResult(message = "set similarity level", logClassInstance = false) Environment setSimilarity(double similarity); @LogToResult(message = "reset similarity level to default") Environment resetSimilarity(); @LogToResult(logClassInstance = false) Region getRegionFromFocusedWindow(); @LogToResult(logClassInstance = false) Path takeScreenshot(final String filename); @LogToResult(logClassInstance = false) Path takeScreenshotWithTimestamp(final String filenamePostfix, final String optFolderPath, final String optFormat); @LogToResult(message = "sleep and do nothing for x seconds", logClassInstance = false) Environment sleep(Integer seconds); @LogToResult(message = "sleep and do nothing for x seconds", logClassInstance = false) Environment sleep(Double seconds); @LogToResult(message = "sleep and do nothing for x milliseconds", logClassInstance = false) Environment sleepMs(Integer milliseconds); @LogToResult(message = "get string from system clipboard", logClassInstance = false) String getClipboard(); @LogToResult(message = "put to clipboard", logClassInstance = false) Environment setClipboard(String text); @LogToResult(logClassInstance = false) Environment cleanClipboard(); @ModifySahiTimer @LogToResult(message = "paste the current clipboard into the focus", logClassInstance = false) Environment pasteClipboard(); @ModifySahiTimer @LogToResult(message = "copy the current selection to the clipboard", logClassInstance = false) Environment copyIntoClipboard(); @ModifySahiTimer @LogToResult(logClassInstance = false) Environment paste(String text); @ModifySahiTimer @LogToResult(logClassInstance = false, logArgs = false) Environment pasteMasked(String text); @ModifySahiTimer @LogToResult(logClassInstance = false, logArgs = false) Environment pasteAndDecrypt(String text); @ModifySahiTimer @LogToResult(message = "type over system keyboard", logClassInstance = false) Environment type(String text); @ModifySahiTimer @LogToResult(message = "type with pressed modifiers", logClassInstance = false) Environment type(String text, String optModifiers); @ModifySahiTimer @LogToResult(message = "type over system keyboard", logClassInstance = false, logArgs = false) Environment typeMasked(String text); @ModifySahiTimer @LogToResult(message = "type with pressed modifiers", logClassInstance = false, logArgs = false) Environment typeMasked(String text, String optModifiers); @ModifySahiTimer @LogToResult(message = "decrypt and type over system keyboard", logClassInstance = false, logArgs = false) Environment typeAndDecrypt(String text); @ModifySahiTimer @LogToResult(message = "decrypt and type with pressed modifiers", logClassInstance = false, logArgs = false) Environment typeAndDecrypt(String text, String optModifiers); @ModifySahiTimer @LogToResult(message = "press key down", logClassInstance = false) Environment keyDown(String keys); @ModifySahiTimer @LogToResult(message = "press key up", logClassInstance = false) Environment keyUp(String keys); @ModifySahiTimer @LogToResult(message = "interpret and write the following expresion", logClassInstance = false) Environment write(String text); @LogToResult(message = "move mouse wheel down x times") Environment mouseWheelDown(int steps); @LogToResult(message = "move mouse wheel up x times") Environment mouseWheelUp(int steps); @LogToResult(logClassInstance = false, logArgs = false) String decryptSecret(String secret); @LogToResult(logClassInstance = false, logArgs = false) boolean isWindows(); @LogToResult(logClassInstance = false, logArgs = false) boolean isLinux(); @LogToResult(logClassInstance = false, logArgs = false) String getOsIdentifier(); @LogToResult(logClassInstance = false) String getEnv(String key); @LogToResult(logClassInstance = false) String getProperty(String key); @Override boolean getResumeOnException(); @Override ScreenActionLoader getLoader(); @Override RegionImpl getActionRegion();  }