Bug on Screenshot link of the emailable-report.html

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug on Screenshot link of the emailable-report.html

Tran Tuan Minh
Hi, I'm customzing the emailable-report from the source code and I come to this very unconvenient problem. The text link on the report is not presenting properly. From what I have investigated the case, it's because of whatever holds the string (String[] ) of the text misunderstand between < > signs with &gt; (or whatever it is), I know this because when I view the source code of the webpage, I see some encoded characters instead of the < and > signs.
So if anybody come up with an idea how to fix it, please show me the way since I don't have much time (my internship gonna expires soon, a little bug in the report is unaccepted) and I don't have much knowdledge/experience about testng, I can't debug on my own.
Thanks.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Bug on Screenshot link of the emailable-report.html

Tran Tuan Minh
I found the solution for myself. I just remove the Utils.escapeHtml and keep the iterator.next() in writeReporterMessages method.

On Thursday, June 20, 2013 2:02:46 PM UTC+7, Tran Tuan Minh wrote:
Hi, I'm customzing the emailable-report from the source code and I come to this very unconvenient problem. The text link on the report is not presenting properly. From what I have investigated the case, it's because of whatever holds the string (String[] ) of the text misunderstand between < > signs with &gt; (or whatever it is), I know this because when I view the source code of the webpage, I see some encoded characters instead of the < and > signs.
So if anybody come up with an idea how to fix it, please show me the way since I don't have much time (my internship gonna expires soon, a little bug in the report is unaccepted) and I don't have much knowdledge/experience about testng, I can't debug on my own.
Thanks.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Bug on Screenshot link of the emailable-report.html

Harini

Hi Minh,

I implemented TestListenerAdapter by overriding the method, onTestFailure() and placed a call to Reporter.log() as:

                Reporter.log("<a href=" + fullFileName + ">Click to open screenshot</a>");

The code works properly in index.html but emailable-report.html does not show the screenshot. The link is presented as plain text in the report:

<a href=/Users/harini/Documents/workspace/rql_qa/UI2.0/WikiApps/target/surefire-reports/screenshots/04-01-2014/FilterTypeaheadTest.testFilterTypeahead12:16:50.png>Click to open screenshot</a>

Could you please post your code to show how you fixed this?

Thanks!



I
On Thursday, June 20, 2013 3:17:58 AM UTC-7, Minh Tran wrote:
I found the solution for myself. I just remove the Utils.escapeHtml and keep the iterator.next() in writeReporterMessages method.

On Thursday, June 20, 2013 2:02:46 PM UTC+7, Tran Tuan Minh wrote:
Hi, I'm customzing the emailable-report from the source code and I come to this very unconvenient problem. The text link on the report is not presenting properly. From what I have investigated the case, it's because of whatever holds the string (String[] ) of the text misunderstand between < > signs with &gt; (or whatever it is), I know this because when I view the source code of the webpage, I see some encoded characters instead of the < and > signs.
So if anybody come up with an idea how to fix it, please show me the way since I don't have much time (my internship gonna expires soon, a little bug in the report is unaccepted) and I don't have much knowdledge/experience about testng, I can't debug on my own.
Thanks.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Bug on Screenshot link of the emailable-report.html

Nikesh
you need to have ...

Reporter.setEscapeHtml(false);
Reporter.log("Saved <a href=" + screenFileName">Saved Screenshot</a>");


On Tue, Apr 1, 2014 at 3:31 PM, Harini <[hidden email]> wrote:

Hi Minh,

I implemented TestListenerAdapter by overriding the method, onTestFailure() and placed a call to Reporter.log() as:

                Reporter.log("<a href=" + fullFileName + ">Click to open screenshot</a>");

The code works properly in index.html but emailable-report.html does not show the screenshot. The link is presented as plain text in the report:

<a href=/Users/harini/Documents/workspace/rql_qa/UI2.0/WikiApps/target/surefire-reports/screenshots/04-01-2014/FilterTypeaheadTest.testFilterTypeahead12:16:50.png>Click to open screenshot</a>

Could you please post your code to show how you fixed this?

Thanks!



I
On Thursday, June 20, 2013 3:17:58 AM UTC-7, Minh Tran wrote:
I found the solution for myself. I just remove the Utils.escapeHtml and keep the iterator.next() in writeReporterMessages method.

On Thursday, June 20, 2013 2:02:46 PM UTC+7, Tran Tuan Minh wrote:
Hi, I'm customzing the emailable-report from the source code and I come to this very unconvenient problem. The text link on the report is not presenting properly. From what I have investigated the case, it's because of whatever holds the string (String[] ) of the text misunderstand between < > signs with &gt; (or whatever it is), I know this because when I view the source code of the webpage, I see some encoded characters instead of the < and > signs.
So if anybody come up with an idea how to fix it, please show me the way since I don't have much time (my internship gonna expires soon, a little bug in the report is unaccepted) and I don't have much knowdledge/experience about testng, I can't debug on my own.
Thanks.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Bug on Screenshot link of the emailable-report.html

Harini
Thanks for the response Nikesh. Isn't escapeHtml set to false by default? I added it like you suggested but the screenshot is not rendered in emailable-report.html (even though it is correctly attached to index.html). Is there a difference between these 2 reports in the way they are rendered?

PS: I'm using Webdriver 2.40.0 with Java bindings and TestNG 6.8.7.

On Tuesday, April 1, 2014 2:26:05 PM UTC-7, Nikesh wrote:
you need to have ...

Reporter.setEscapeHtml(false);
Reporter.log("Saved <a href=" + screenFileName">Saved Screenshot</a>");


On Tue, Apr 1, 2014 at 3:31 PM, Harini <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="9vrqWaCrEScJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">zii...@...> wrote:

Hi Minh,

I implemented TestListenerAdapter by overriding the method, onTestFailure() and placed a call to Reporter.log() as:

                Reporter.log("<a href=" + fullFileName + ">Click to open screenshot</a>");

The code works properly in index.html but emailable-report.html does not show the screenshot. The link is presented as plain text in the report:

<a href=/Users/harini/Documents/workspace/rql_qa/UI2.0/WikiApps/target/surefire-reports/screenshots/04-01-2014/FilterTypeaheadTest.testFilterTypeahead12:16:50.png>Click to open screenshot</a>

Could you please post your code to show how you fixed this?

Thanks!



I
On Thursday, June 20, 2013 3:17:58 AM UTC-7, Minh Tran wrote:
I found the solution for myself. I just remove the Utils.escapeHtml and keep the iterator.next() in writeReporterMessages method.

On Thursday, June 20, 2013 2:02:46 PM UTC+7, Tran Tuan Minh wrote:
Hi, I'm customzing the emailable-report from the source code and I come to this very unconvenient problem. The text link on the report is not presenting properly. From what I have investigated the case, it's because of whatever holds the string (String[] ) of the text misunderstand between < > signs with &gt; (or whatever it is), I know this because when I view the source code of the webpage, I see some encoded characters instead of the < and > signs.
So if anybody come up with an idea how to fix it, please show me the way since I don't have much time (my internship gonna expires soon, a little bug in the report is unaccepted) and I don't have much knowdledge/experience about testng, I can't debug on my own.
Thanks.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="9vrqWaCrEScJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">testng-users...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="9vrqWaCrEScJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">testng...@....
Visit this group at <a href="http://groups.google.com/group/testng-users" target="_blank" onmousedown="this.href='http://groups.google.com/group/testng-users';return true;" onclick="this.href='http://groups.google.com/group/testng-users';return true;">http://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Bug on Screenshot link of the emailable-report.html

Ankit Tripathi
In reply to this post by Nikesh
Hi Nikesh,

Can you please provide the location as to where I need to add this Reporter.setEscapeHtml(false);
As I also want to integrate the screenshots links to emailable-report.html

On Wednesday, April 2, 2014 at 2:56:05 AM UTC+5:30, Nikesh wrote:
you need to have ...

Reporter.setEscapeHtml(false);
Reporter.log("Saved <a href=" + screenFileName">Saved Screenshot</a>");


On Tue, Apr 1, 2014 at 3:31 PM, Harini <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="9vrqWaCrEScJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">zii...@...> wrote:

Hi Minh,

I implemented TestListenerAdapter by overriding the method, onTestFailure() and placed a call to Reporter.log() as:

                Reporter.log("<a href=" + fullFileName + ">Click to open screenshot</a>");

The code works properly in index.html but emailable-report.html does not show the screenshot. The link is presented as plain text in the report:

<a href=/Users/harini/Documents/workspace/rql_qa/UI2.0/WikiApps/target/surefire-reports/screenshots/04-01-2014/FilterTypeaheadTest.testFilterTypeahead12:16:50.png>Click to open screenshot</a>

Could you please post your code to show how you fixed this?

Thanks!



I
On Thursday, June 20, 2013 3:17:58 AM UTC-7, Minh Tran wrote:
I found the solution for myself. I just remove the Utils.escapeHtml and keep the iterator.next() in writeReporterMessages method.

On Thursday, June 20, 2013 2:02:46 PM UTC+7, Tran Tuan Minh wrote:
Hi, I'm customzing the emailable-report from the source code and I come to this very unconvenient problem. The text link on the report is not presenting properly. From what I have investigated the case, it's because of whatever holds the string (String[] ) of the text misunderstand between < > signs with &gt; (or whatever it is), I know this because when I view the source code of the webpage, I see some encoded characters instead of the < and > signs.
So if anybody come up with an idea how to fix it, please show me the way since I don't have much time (my internship gonna expires soon, a little bug in the report is unaccepted) and I don't have much knowdledge/experience about testng, I can't debug on my own.
Thanks.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="9vrqWaCrEScJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng-users...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="9vrqWaCrEScJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng...@....
Visit this group at <a href="http://groups.google.com/group/testng-users" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://groups.google.com/group/testng-users&#39;;return true;" onclick="this.href=&#39;http://groups.google.com/group/testng-users&#39;;return true;">http://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Bug on Screenshot link of the emailable-report.html

Player Singh
Hi All,

I' am facing same problem. However, i used Reporter.setEscapeHtml(false); too but it is not supported anymore. Please suggest another way. your help will be appreciated.

Thanks,

On Tuesday, February 16, 2016 at 8:31:44 PM UTC+5:30, Ankit Tripathi wrote:
Hi Nikesh,

Can you please provide the location as to where I need to add this Reporter.setEscapeHtml(false);
As I also want to integrate the screenshots links to emailable-report.html

On Wednesday, April 2, 2014 at 2:56:05 AM UTC+5:30, Nikesh wrote:
you need to have ...

Reporter.setEscapeHtml(false);
Reporter.log("Saved <a href=" + screenFileName">Saved Screenshot</a>");


On Tue, Apr 1, 2014 at 3:31 PM, Harini <[hidden email]> wrote:

Hi Minh,

I implemented TestListenerAdapter by overriding the method, onTestFailure() and placed a call to Reporter.log() as:

                Reporter.log("<a href=" + fullFileName + ">Click to open screenshot</a>");

The code works properly in index.html but emailable-report.html does not show the screenshot. The link is presented as plain text in the report:

<a href=/Users/harini/Documents/workspace/rql_qa/UI2.0/WikiApps/target/surefire-reports/screenshots/04-01-2014/FilterTypeaheadTest.testFilterTypeahead12:16:50.png>Click to open screenshot</a>

Could you please post your code to show how you fixed this?

Thanks!



I
On Thursday, June 20, 2013 3:17:58 AM UTC-7, Minh Tran wrote:
I found the solution for myself. I just remove the Utils.escapeHtml and keep the iterator.next() in writeReporterMessages method.

On Thursday, June 20, 2013 2:02:46 PM UTC+7, Tran Tuan Minh wrote:
Hi, I'm customzing the emailable-report from the source code and I come to this very unconvenient problem. The text link on the report is not presenting properly. From what I have investigated the case, it's because of whatever holds the string (String[] ) of the text misunderstand between < > signs with &gt; (or whatever it is), I know this because when I view the source code of the webpage, I see some encoded characters instead of the < and > signs.
So if anybody come up with an idea how to fix it, please show me the way since I don't have much time (my internship gonna expires soon, a little bug in the report is unaccepted) and I don't have much knowdledge/experience about testng, I can't debug on my own.
Thanks.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at <a href="http://groups.google.com/group/testng-users" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://groups.google.com/group/testng-users&#39;;return true;" onclick="this.href=&#39;http://groups.google.com/group/testng-users&#39;;return true;">http://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.