File tree 1 file changed +6
-3
lines changed
src/test/java/com/yourcompany
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 40
40
@ Listeners ({SauceOnDemandTestListener .class })
41
41
public class SampleSauceTest implements SauceOnDemandSessionIdProvider , SauceOnDemandAuthenticationProvider {
42
42
43
+ public String username = System .getenv ("SAUCE_USERNAME" ) != null ? System .getenv ("SAUCE_USERNAME" ) : System .getenv ("SAUCE_USER_NAME" );
44
+ public String accesskey = System .getenv ("SAUCE_ACCESS_KEY" ) != null ? System .getenv ("SAUCE_ACCESS_KEY" ) : System .getenv ("SAUCE_API_KEY" );
45
+
43
46
/**
44
- * Constructs a {@link com.saucelabs.common. SauceOnDemandAuthentication} instance using the supplied user name/access key. To use the authentication
45
- * supplied by environment variables or from an external file, use the no-arg {@link com.saucelabs.common. SauceOnDemandAuthentication} constructor.
47
+ * Constructs a {@link SauceOnDemandAuthentication} instance using the supplied user name/access key. To use the authentication
48
+ * supplied by environment variables or from an external file, use the no-arg {@link SauceOnDemandAuthentication} constructor.
46
49
*/
47
- public SauceOnDemandAuthentication authentication = new SauceOnDemandAuthentication (System . getenv ( "SAUCE_USERNAME" ), System . getenv ( "SAUCE_ACCESS_KEY" ) );
50
+ public SauceOnDemandAuthentication authentication = new SauceOnDemandAuthentication (username , accesskey );
48
51
49
52
/**
50
53
* ThreadLocal variable which contains the {@link WebDriver} instance which is used to perform browser interactions with.
You can’t perform that action at this time.
0 commit comments