kimon
kimon

Reputation: 2505

Embed a file in robotframework report or log?

Is there a way to embed a file in an robotframework log or report?

For example, say a particular test runs a shell command and creates an output file. Can I attach that file to the log so that I can open that file later?

I've seen screenshots attached as part of the selenium integration, so it seems like that capability exists at some level.

Upvotes: 0

Views: 2671

Answers (1)

Bryan Oakley
Bryan Oakley

Reputation: 386010

If you log something that looks like a hyperlink, robot will turn it in to a hyperlink. For example, if "data.txt" is in the same folder as the log file you can do something like this:

| | log | file://data.txt

You can also create your own hyperlink with the optional html=True argument to log:

| | log | <a href="file://path/to/file">test data file</a> | html=True

Upvotes: 3

Related Questions