The Following code contains two methods.The first method startSeleniumServer() is for starting the server and the second method stopSeleniumServer() is to stop the started server.With this we are also able to trace out the server log to a file called "logs/seleniumServer.log" into your local machine.
- protected RemoteControlConfiguration rc ;
- protected SeleniumServer seleniumServer ;
- public void startSeleniumServer() {
- try {
- rc = new RemoteControlConfiguration();
- rc.setLogOutFile(logfile);
- seleniumServer = new SeleniumServer(rc);
- seleniumServer.start();
- e.printStackTrace();
- }
- }
- seleniumServer.stop();
- }
No comments:
Post a Comment