@@ -42,23 +42,33 @@ public void startDefaultAppium() throws Exception {
42
42
public void appiumServer (String deviceID ) throws Exception {
43
43
System .out .println ("Starting Appium Server" );
44
44
System .out .println (deviceID );
45
+ System .out .println ("Attempt to get port.." );
45
46
int port = ap .getPort ();
47
+ System .out .println ("Port " + port );
48
+ System .out .println ("Attempt to get chrome port.." );
46
49
int chromePort = ap .getPort ();
50
+ System .out .println ("Chrome port " + chromePort );
51
+ System .out .println ("Attempt to get bootstrap port.." );
47
52
int bootstrapPort = ap .getPort ();
53
+ System .out .println ("Bootstrap port" + bootstrapPort );
48
54
Thread .currentThread ().sleep (5000 );
55
+
56
+ System .out .println ("Attempt to start server" );
49
57
builder = new AppiumServiceBuilder ()
50
- .withAppiumJS (new File ("/usr/local/lib/node_modules/appium/bin/appium.js" ))
51
- .withArgument (GeneralServerFlag .APP ,
52
- "/Users/saikrisv/Documents/workspace/workspace1/AppiumTest/build/AndroidCalculator.apk" )
58
+ // .withAppiumJS(new File("/usr/local/lib/node_modules/appium/bin/appium.js"))
59
+ // .withArgument(GeneralServerFlag.APP,
60
+ // "/Users/saikrisv/Documents/workspace/workspace1/AppiumTest/build/AndroidCalculator.apk")
53
61
.withArgument (GeneralServerFlag .LOG_LEVEL , "info" )
54
62
.withArgument (GeneralServerFlag .UIID , deviceID )
55
63
.withArgument (GeneralServerFlag .CHROME_DRIVER_PORT , Integer .toString (chromePort ))
56
64
.withArgument (AndroidServerFlag .BOOTSTRAP_PORT_NUMBER , Integer .toString (bootstrapPort ))
57
- .withArgument (GeneralServerFlag .SESSION_OVERRIDE ).usingPort (port );
65
+ .withArgument (GeneralServerFlag .SESSION_OVERRIDE ).usingPort (port ).withLogFile (new File ("Log" + Thread .currentThread ().getName () +
66
+ Thread .currentThread ().getId ()));
58
67
/* and so on */ ;
59
68
60
69
appiumDriverLocalService = builder .build ();
61
70
appiumDriverLocalService .start ();
71
+ System .out .println ("Server has been started" );
62
72
//appiumDriverLocalService.getStdOut();
63
73
64
74
System .out .println (appiumDriverLocalService .isRunning ());
0 commit comments