prashant-ramcharan / courgette-jvm

Multiprocess | Parallel Cucumber-JVM | Parallelize your Java Cucumber tests on a feature level or on a scenario level.
MIT License
130 stars 38 forks source link

How to embed a URL in the courgette report as URL instead of just String? #387

Closed bhala-ki closed 10 months ago

bhala-ki commented 10 months ago

I would like to embed a URL in the report in the after Hooks. Neither of the below works: scenario.log("URL OF TEST IS: "+ pageHelpers.getCurrentUrl()); (OR)
scenario.attach(pageHelpers.getCurrentUrl(), "URL", "URL OF TEST IS: ");

bhala-ki commented 10 months ago

Resolved it by the following which works absolutely fine: String currentUrl = <a href= + driver.getCurrentUrl() + ">" + driver.getCurrentUrl() + ; <PUT THE DOUBLE QUOTES WHEREVER NECESSARY ELSE IT'S TAKING AS URL>

Any other alternatives are also appreciable!

prashant-ramcharan commented 10 months ago

Hi,

Yes, adding valid html when using scenario.log is the only way to do it.