/** * @param sessionIdProvider Id provider for the current web driver session * @param username Sauce user name * @param accessKey Sauce access key * @param verboseMode Enables verbose mode */ public SauceOnDemandTestWatcher(SauceOnDemandSessionIdProvider sessionIdProvider, final String username, final String accessKey, boolean verboseMode) { this.sessionIdProvider = sessionIdProvider; sauceREST = new SauceREST(username, accessKey); this.verboseMode = verboseMode; }
/** * @param sessionIdProvider Id provider for the current web driver session * @param username Sauce user name * @param accessKey Sauce access key * @param verboseMode Enables verbose mode */ public SauceOnDemandTestWatcher(SauceOnDemandSessionIdProvider sessionIdProvider, final String username, final String accessKey, boolean verboseMode) { this.sessionIdProvider = sessionIdProvider; sauceREST = new SauceREST(username, accessKey); this.verboseMode = verboseMode; }
public SauceREST getRestClient() { return new SauceREST(userName, apiKey); } }
@Override public void afterPropertiesSet() throws Exception { sauceREST = new SauceREST(authentication.getUsername(), authentication.getAccessKey()); }
/** * @param result Test Result for the test being started */ @Override public void onTestStart(ITestResult result) { super.onTestStart(result); if (isLocal) { return; } SauceOnDemandAuthentication sauceOnDemandAuthentication; if (result.getInstance() instanceof SauceOnDemandAuthenticationProvider) { //use the authentication information provided by the test class SauceOnDemandAuthenticationProvider provider = (SauceOnDemandAuthenticationProvider) result.getInstance(); sauceOnDemandAuthentication = provider.getAuthentication(); } else { //otherwise use the default authentication sauceOnDemandAuthentication = new SauceOnDemandAuthentication(); } this.sauceREST = new SauceREST(sauceOnDemandAuthentication.getUsername(), sauceOnDemandAuthentication.getAccessKey()); }
/** * @param result Test Result for the test being started */ @Override public void onTestStart(ITestResult result) { super.onTestStart(result); if (isLocal) { return; } SauceOnDemandAuthentication sauceOnDemandAuthentication; if (result.getInstance() instanceof SauceOnDemandAuthenticationProvider) { //use the authentication information provided by the test class SauceOnDemandAuthenticationProvider provider = (SauceOnDemandAuthenticationProvider) result.getInstance(); sauceOnDemandAuthentication = provider.getAuthentication(); } else { //otherwise use the default authentication sauceOnDemandAuthentication = new SauceOnDemandAuthentication(); } this.sauceREST = new SauceREST(sauceOnDemandAuthentication.getUsername(), sauceOnDemandAuthentication.getAccessKey()); }