Is there any way to find out if selenium is running using code?
I want to find out if selenium is running and if it isn't then call a bat file to start it. Is it possible to 开发者_StackOverflow社区find out if selenium standalone is running?
If you are using Java, you can invoke the server programmatically -
RemoteControlConfiguration settings = new RemoteControlConfiguration();
File f = new File("C:\\selenium-profile");
settings.setFirefoxProfileTemplate(f);
settings.setReuseBrowserSessions(true);
SeleniumServer seleniumserver=new SeleniumServer(settings);
seleniumserver.boot();
setUp("http://www.google.com", "*firefox");
精彩评论