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

How to replace/remove "Extent" label from report located on top left corner.

Open VinitSandesara opened this issue 7 years ago • 3 comments

Here is my Config.xml where i added javascript code to replace/remove extent label but it doesn't work, Can someone please help here.

screen shot 2018-05-16 at 11 28 15 am

standard
    <!-- document encoding -->
    <!-- defaults to UTF-8 -->
    <encoding>UTF-8</encoding>

    <!-- protocol for script and stylesheets -->
    <!-- defaults to https -->
    <protocol>https</protocol>

    <!-- title of the document -->
    <documentTitle>Tauck Automation Report</documentTitle>


    <!-- report name - displayed at top-nav -->
    <reportName>
        <image id="image-zoom">
            <![CDATA[

	        ]]>
        </image>

    </reportName>


    <!-- report headline - displayed at top-nav, after reportHeadline -->
    <reportHeadline>Headline 1</reportHeadline>

    <!-- global date format override -->
    <!-- defaults to yyyy-MM-dd -->
    <dateFormat>yyyy-MM-dd</dateFormat>

    <!-- global time format override -->
    <!-- defaults to HH:mm:ss -->
    <timeFormat>HH:mm:ss</timeFormat>

    **<!-- custom javascript -->
    <scripts>
        <![CDATA[
           $(document).ready(function() { $(".brand-logo blue darken-3").html("Some Small HTML text" ); });
        ]]>
    </scripts>**


    <!-- custom styles -->

    <styles>
        <![CDATA[

            ]]>
    </styles>

</configuration>

=== Extent report version i have in my project is ======

com.aventstack extentreports 3.0.5

VinitSandesara avatar May 16 '18 16:05 VinitSandesara

@anshooarora , Can you please help, this is holding my project deadline.

Thanks Vinit

VinitSandesara avatar May 21 '18 14:05 VinitSandesara

Hi Vinit, in your extent-config.xml, just update the script tag with the following. This will show VINIT instead of Extent at the top left corner in the report.

<scripts>
          <![CDATA[
                $('.brand-logo').text('VINIT');
 
            ]]>

</scripts>

I hope this will help to meet your deadline.

dipesh17 avatar May 21 '18 15:05 dipesh17

Thanks @dipesh17 for giving your some valuable time however i tried your solution mentioned in your comment above but it didn't work.

FYI, i have extent report version extentreports 3.0.5, do you have same ?

screen shot 2018-05-23 at 12 36 45 pm

standard
    <!-- document encoding -->
    <!-- defaults to UTF-8 -->
    <encoding>UTF-8</encoding>

    <!-- protocol for script and stylesheets -->
    <!-- defaults to https -->
    <protocol>https</protocol>

    <!-- title of the document -->
    <documentTitle>Tauck Automation Report</documentTitle>


    <!-- report name - displayed at top-nav -->
    <reportName>
        Tauck Automation Report

    </reportName>


    <!-- report headline - displayed at top-nav, after reportHeadline -->
    <reportHeadline>Headline 1</reportHeadline>

    <!-- global date format override -->
    <!-- defaults to yyyy-MM-dd -->
    <dateFormat>yyyy-MM-dd</dateFormat>

    <!-- global time format override -->
    <!-- defaults to HH:mm:ss -->
    <timeFormat>HH:mm:ss</timeFormat>

    <!-- custom javascript -->
    <scripts>
        <![CDATA[
            $('.brand-logo').text('VINIT');
        ]]>

    </scripts>

    <!-- custom styles -->

    <styles>
        <![CDATA[

            ]]>
    </styles>

</configuration>

TauckAutomation avatar May 23 '18 17:05 TauckAutomation