Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Platform specifics

jpeterka edited this page Aug 22, 2013 · 2 revisions

From time to time you need to customize test behaviour based on specific platforms. You can use Utils class providing simple test if you're running expected platform.

Test if you're running Mac OSX

import org.eclipse.core.runtime.Platform;
import org.jboss.reddeer.swt.util;

// now I need to customize
if (Utils.isRunningOS(OS.MACOSX) {
  // do osx customized code
} else if (Utils.isRunningOS(OS.WINDOWS) {
  // do windows customized code
} else {
  //
}
Clone this wiki locally