Skip to content

Report result files with file:// prefix on console to make them clickable (on supporting shells) #2435

Closed as not planned

Description

@mgedmin

When Robot Framework finishes running tests, it prints something like

Output:  /home/mg/src/project/robottests/output/output.xml
Log:     /home/mg/src/project/robottests/output/log.html
Report:  /home/mg/src/project/robottests/output/report.html

Now if instead of filenames it would print file:// URLs like this

Output:  file:///home/mg/src/project/robottests/output/output.xml
Log:     file:///home/mg/src/project/robottests/output/log.html
Report:  file:///home/mg/src/project/robottests/output/report.html

then I could open those reports in my browser by Ctrl-click them in my GNOME Terminal.

It's a tiny detail, but it feels nice.

Activity

  1. pekkaklarck commented on Aug 25, 2016

    @pekkaklarck
    Member

    That would be handy but I'm slightly afraid about the added clutter for those who don't use terminal supporting this. Adding a command line option to control the behavior is obviously possible, but it would make using the functionality a little harder and less likely for users to find about the functionality. The former problem could be resolved by setting the option to ROBOT_OPTIONS environment variable, though.

    PS: Thanks for the tip! As a long time Ubuntu/Mint user I've noticed that URLs on console are underlined on hover and was surprised that clicking didn't work. Now I know that I need to Ctrl-click them!

  2. pekkaklarck commented on Jan 30, 2017

    @pekkaklarck
    Member

    This would be a really handy feature on shells that support clicking file URLs. Does anyone know do all Linux shells support it? What about OSX? At least the standard command prompt on Windows doesn't, but does anyone know about PowerShell and new Windows bash support?

    One possibility to implement this would be adding the file://prefix on operating systems where it is supported by default and having an option that can be used to enable or disable it.

  3. changed the title [-]Wishlist: clickable report URLs[/-] [+]Report result files with `file://` prefix on console to make them clickable (on supporting shells)[/+] on Jan 30, 2017
  4. cjnewman commented on Jan 31, 2017

    @cjnewman

    I just tested this on MacOS Terminal (Sierra); command-click on file:///... works there although I see no visual indicator prior to clicking.

  5. pekkaklarck commented on Apr 23, 2018

    @pekkaklarck
    Member

    I still feel this would be a nice enhancement, but it cannot be on by default regardless the OS. Basically two options:

    • Always off by default. Add a command line option to enable it.
    • On by default outside Windows when output goes to a terminal. Add an option to enable and disable it.

    Wouldn't be overly complicated, but I'm still not sure is it worth the effort. What do others think? Anyone interested to implement this?

  6. pekkaklarck commented on Aug 29, 2024

    @pekkaklarck
    Member

    Terminal emulators nowadays support custom hyperlinks that avoid the need to add visible file:/// prefix. Issue #5189 proposes using that functionality and this issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions