I am attempting to use the API for building and running test suites and I've noticed that the log.html that is output when using the API vs the shell is subtly different.
The log when using the command line invocation
The log when run through a minimal python script
The minimal python script:
import robot.api
import robot.result
from robot.conf.settings import RobotSettings
options = {
"output": "./results.xml",
"log": "./log.html",
"report": "./report.html",
"loglevel": "TRACE"
}
settings = RobotSettings(options)
suite = robot.api.TestSuiteBuilder().build(".")
result = suite.run(settings=settings)
result_writer = robot.api.ResultWriter(result)
result_writer.write_results(settings=settings.get_rebot_settings())
As can be seen the log is missing a lot of keyword detail, how can I get this back?
edit: The minimal file after changing it to the correct method:
import robot.api
import robot.result
from robot.conf.settings import RobotSettings
options = {
"output": "./results.xml",
"log": "./log.html",
"report": "./report.html",
"loglevel": "TRACE",
"rpa": False
}
settings = RobotSettings(options)
suite = robot.api.TestSuiteBuilder().build(".")
result = suite.run(settings=settings)
result_writer = robot.api.ResultWriter("./results.xml")
result_writer.write_results(settings=settings.get_rebot_settings())

