@@ -17,22 +17,24 @@ public class BaseTest {
17
17
18
18
@ BeforeTest
19
19
public void setup () {
20
- final String userName = System .getenv ("LT_USERNAME" ) == null ? "LT_USERNAME" : System .getenv ("LT_USERNAME" );
21
- final String accessKey = System .getenv ("LT_ACCESS_KEY" ) == null ? "LT_ACCESS_KEY" : System .getenv ("LT_ACCESS_KEY" );
22
- final String gridUrl = "@hub.lambdatest.com/wd/hub" ;
20
+ String userName = System .getenv ("LAMBDATEST_USERNAME" ) == null ? "LAMBDATEST_USERNAME" : System .getenv (
21
+ "LT_USERNAME" );
22
+ String accessKey = System .getenv ("LAMBDATEST_ACCESS_KEY" ) == null ? "LAMBDATEST_ACCESS_KEY" : System .getenv (
23
+ "LT_ACCESS_KEY" );
24
+ String gridUrl = "@hub.lambdatest.com/wd/hub" ;
23
25
try {
24
26
this .driver = new RemoteWebDriver (new URL ("http://" + userName + ":" + accessKey + gridUrl ), getChromeOptions ());
25
- } catch (final MalformedURLException e ) {
27
+ } catch (MalformedURLException e ) {
26
28
System .out .println ("Could not start the remote session on LambdaTest cloud grid" );
27
29
}
28
30
this .driver .manage ().timeouts ().implicitlyWait (Duration .ofSeconds (5 ));
29
31
}
30
32
31
33
public ChromeOptions getChromeOptions () {
32
- final var browserOptions = new ChromeOptions ();
34
+ var browserOptions = new ChromeOptions ();
33
35
browserOptions .setPlatformName ("Windows 10" );
34
36
browserOptions .setBrowserVersion ("latest" );
35
- final HashMap <String , Object > ltOptions = new HashMap <String , Object >();
37
+ HashMap <String , Object > ltOptions = new HashMap <String , Object >();
36
38
ltOptions .put ("project" , "LambdaTest e-commerce website automation" );
37
39
ltOptions .put ("build" , "LambdaTest e-commerceV1.0.0" );
38
40
ltOptions .put ("name" , "Homepage search product test" );
@@ -46,7 +48,6 @@ public ChromeOptions getChromeOptions() {
46
48
47
49
@ AfterTest
48
50
public void tearDown () {
49
-
50
51
this .driver .executeScript ("lambda-status=" + this .status );
51
52
this .driver .quit ();
52
53
}
0 commit comments