In notice that following code is needed in the Setup():
@Before
public void setUp() {
final String resultPath = "absolute-path-to-where-your-result-will-be-written";
final String resultHtmlFileName = resultPath + File.separator + "result.html";
final String resultEncoding = "UTF-8"
loggingWriter = LoggingUtils.createWriter(resultHtmlFileName, resultEncoding);
LoggingResultsFormatter htmlFormatter =
new HtmlResultFormatter(loggingWriter, resultEncoding);
htmlFormatter.setScreenShotBaseUri(""); // this is for linking to the screenshots
htmlFormatter.setAutomaticScreenshotPath(resultPath);
// wrap HttpCommandProcessor from remote-control
LoggingCommandProcessor myProcessor =
new LoggingCommandProcessor(new HttpCommandProcessor(your-configs), htmlFormatter);
selenium = new LoggingDefaultSelenium(myProcessor);
selenium.start();
}
Hi,
Is LoggingSelenium possible with GRID?
In notice that following code is needed in the Setup():
@Before
public void setUp() {
final String resultPath = "absolute-path-to-where-your-result-will-be-written";
final String resultHtmlFileName = resultPath + File.separator + "result.html";
final String resultEncoding = "UTF-8"
loggingWriter = LoggingUtils.createWriter(resultHtmlFileName, resultEncoding);
LoggingResultsFormatter htmlFormatter =
new HtmlResultFormatter(loggingWriter, resultEncoding);
htmlFormatter.setScreenShotBaseUri(""); // this is for linking to the screenshots
htmlFormatter.setAutomaticScreenshotPath(resultPath);
// wrap HttpCommandProcessor from remote-control
LoggingCommandProcessor myProcessor =
new LoggingCommandProcessor(new HttpCommandProcessor(your-configs), htmlFormatter);
selenium = new LoggingDefaultSelenium(myProcessor);
selenium.start();
}
But for the GRID setup following is needed:
@BeforeMethod(groups = {"default", "example"}, alwaysRun = true)
@Parameters({"seleniumHost", "seleniumPort", "browser", "webSite"})
protected void startSession(String seleniumHost, int seleniumPort, String browser, String webSite) {
startSeleniumSession(seleniumHost, seleniumPort, browser, webSite);
session().setTimeout(TIMEOUT);
}