File tree Expand file tree Collapse file tree
src/test/java/com/browserstack/gauge/pages Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,16 +42,21 @@ public void setUp() throws Exception {
4242 HashMap <String , Object > browserstackOptions = new HashMap <String , Object >();
4343
4444 if (!(System .getenv ("LOCAL" ).isEmpty ()) && System .getenv ("LOCAL" ).equalsIgnoreCase ("true" )) {
45- if (local != null && local .isRunning ()) {
46- browserstackOptions .put ("local" , "true" );
45+ if (local == null || !local .isRunning ()){
46+ local = new Local ();
47+ Map <String , String > options = new HashMap <String , String >();
48+ options .put ("key" , AUTOMATE_KEY );
49+ local .start (options );
4750 }
51+ browserstackOptions .put ("local" , "true" );
4852 }
4953
5054 // Capabilities from environment
5155 if (System .getenv ("DEVICE" ) != null ){
5256 caps .setCapability ("browserName" , System .getenv ("BROWSERNAME" ));
53- caps .setCapability ("os" , System .getenv ("PLATFORM" ));
54- caps .setCapability ("deviceName" , System .getenv ("DEVICE" ));
57+ caps .setCapability ("platformName" , System .getenv ("PLATFORM" ));
58+
59+ browserstackOptions .put ("deviceName" , System .getenv ("DEVICE" ));
5560 }
5661 else {
5762 caps .setCapability ("browserName" , System .getenv ("BROWSERNAME" ));
You can’t perform that action at this time.
0 commit comments