Forum Discussion
lavalleep
13 years agoNew Contributor
The problem was resolved:
Here is the solution written with JScript. I work on a VM and the only browser installed is Internet Explorer. By changing the value in the Browser.Item(), Mozilla or Chrome can be launch instead.
/**
* Exports to HTML format the project suite test execution results
* Param showLogInBrowser (Boolean) - Open browser once the generation is successful
*/
function ExportResults(showLogInBrowser)
{
var fileName = "Somepath";
try
{
Indicator.PushText("Exporting Test Logs to " + fileName);
Log.SaveResultsAs(fileName, 1);
Log.Message("Export completed succesfully!");
if(showLogInBrowser)
Browsers.Item(btIExplorer).Run(fileName + "\\index.htm");
}
catch(ex)
{
Log.Error(ex.Name + " " + ex.Description);
}
}
Here is the solution written with JScript. I work on a VM and the only browser installed is Internet Explorer. By changing the value in the Browser.Item(), Mozilla or Chrome can be launch instead.
/**
* Exports to HTML format the project suite test execution results
* Param showLogInBrowser (Boolean) - Open browser once the generation is successful
*/
function ExportResults(showLogInBrowser)
{
var fileName = "Somepath";
try
{
Indicator.PushText("Exporting Test Logs to " + fileName);
Log.SaveResultsAs(fileName, 1);
Log.Message("Export completed succesfully!");
if(showLogInBrowser)
Browsers.Item(btIExplorer).Run(fileName + "\\index.htm");
}
catch(ex)
{
Log.Error(ex.Name + " " + ex.Description);
}
}
Related Content
- 5 years ago
- 4 years ago
Recent Discussions
- 17 hours ago