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

Extent Report is not configurable by extent-config.xml file, custom javascript is not working

Open HamzaMirza opened this issue 6 years ago • 12 comments

Extent Report is not configurable by extent-config.xml file, custom javascript is not working

HamzaMirza avatar Sep 13 '19 11:09 HamzaMirza

I have fixed the issue, kindly accept my pull request of "https://github.com/extent-framework/extentreports-csharp/pull/64"

HamzaMirza avatar Oct 02 '19 06:10 HamzaMirza

I have this same problem in version 4.0.3. Could you help me, please?

beloquintana avatar Jun 09 '20 15:06 beloquintana

I have this same problem in version 4.0.3. Could you help me, please?

@beloquintana sure, locate script calling part such as ExtentReports/Views/Html/Partials/Scripts.cshtml

And find the problem, which was custom script tag was called before the library was included and also the variable name was incorrectly called, 'js' which was 'JS' DEFINED IN MASTERCONFIG FILE.

It's been a while since I have worked on extent reports, so feel free to dm me, I would love to solve the issue.

HamzaMirza avatar Jun 09 '20 19:06 HamzaMirza

@HamzaMirza I don't understand. This issue is still open or is closed?

beloquintana avatar Jun 09 '20 19:06 beloquintana

@HamzaMirza I don't understand. This issue is still open or is closed?

@beloquintana the issue was closed on my pull request. You have older version of extent report, update to the latest version, the issue will be resolved.

HamzaMirza avatar Jun 09 '20 19:06 HamzaMirza

I am using the last stable version: 4.0.3

beloquintana avatar Jun 09 '20 19:06 beloquintana

@beloquintana Please use this config. As @HamzaMirza pointed out, the configuration entries have changed from "scripts"->"js" and "styles"->"css".

anshooarora avatar Jun 09 '20 20:06 anshooarora

Also - if possible, I would suggest using version 4.1.0-beta1 from nuget with ExtentHtmlReporter and let me know if you continue to have issues.

anshooarora avatar Jun 09 '20 20:06 anshooarora

@anshooarora Thanks for your answer, I can't use 4.1.0-beta1 for now. My report is loading the javascript code with the config that you recomended me, but I have problem with jquery. The report show me this error: Uncaught ReferenceError: $ is not defined How I can load jquery in my report?

beloquintana avatar Jun 10 '20 12:06 beloquintana

Hi - more details would help. Which reporter? Can you share the config.xml?

anshooarora avatar Jun 11 '20 07:06 anshooarora

This is my config.xml: config.zip

It work fine in version 3.1.3 with the tags: script and styles.

beloquintana avatar Jun 11 '20 12:06 beloquintana

Extent Report is not configurable by extent-config.xml file, custom javascript is not working

@HamzaMirza I have few doubts related to customization of extent report using js. Can I have your email id so could ask?

vishal131991 avatar Oct 15 '20 13:10 vishal131991