extentreports-java icon indicating copy to clipboard operation
extentreports-java copied to clipboard

How to use custom java script from code itself(not to use from config xml file) using extent reports 3.1.3 jar

Open mujeebsk opened this issue 7 years ago • 1 comments

Summary

We are using table format for displaying results using extent reports. We're having 4 columns with n number of rows data. For example, if a cell contains large text then data in cells is not wrapped and expanding which shows report very bad.

Expected Behavior

To overcome this we're trying to execute custom java script and modify width, height of cells. Also I dont want to achieve this by using custom java script from configuration xml file. I want to achieve it using ExtentHtmlReporter object like

extent.configuration().scripts().insertJS("$('.test').click(function(){ alert('test clicked'); });");(This does not work for 3.1.3)


## Environment Details


* Extent report Version used: 3.1.3
* Operating System and version: Windows 10
* JDK Version: 1.8

## Screenshots

![mujeeb](https://user-images.githubusercontent.com/37687777/37817400-9ecf860a-2eb1-11e8-930f-145f4fc96e40.png)

mujeebsk avatar Mar 23 '18 07:03 mujeebsk

It will be helpful to my project as well, If someone have any solution please help.

VinitSandesara avatar May 16 '18 16:05 VinitSandesara