Parallel execution

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

Re: Parallel execution

Kuzhali Velmurugan
Hi,

Actually, the web driver instance in screenshot capture listener class was null.
Initially, as the web driver instance was static, I didn't face this issue.
Now I did a workaround, added an after method in base setup to capture the screenshot when test fails.
This resolved the issue.



On Saturday, 23 June 2018 08:57:30 UTC+5:30, Krishnan Mahadevan wrote:

Please share a full fledged simple standalone test, that can be used to reproduce the problem.

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ <a href="http://wakened-cognition.blogspot.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;">http://wakened-cognition.blogspot.com/

My Technical Scribbings @ <a href="http://rationaleemotions.wordpress.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;">http://rationaleemotions.wordpress.com/

 

From: <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="iLp2Yh6zCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">seleniu...@googlegroups.com> on behalf of Kuzhali Velmurugan <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="iLp2Yh6zCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">kuzhali.v...@...>
Reply-To: <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="iLp2Yh6zCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">seleniu...@googlegroups.com>
Date: Friday, June 22, 2018 at 6:10 PM
To: Selenium Users <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="iLp2Yh6zCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">seleniu...@googlegroups.com>
Subject: Re: [selenium-users] Re: Parallel execution

 

Hi,

 

It didnt seem to work with that version of testNG (6.14.3).

On Thursday, 14 June 2018 22:21:40 UTC+5:30, Kuzhali Velmurugan wrote:

Ok, Thank you. I will try with that version and post on Tuesday(we have long weekend). 

 

On Thu, 14 Jun 2018 at 10:15 PM, Krishnan Mahadevan <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="iLp2Yh6zCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">krishnan.ma...@gmail.com> wrote:

Please retry using 6.14.3 and kindly post back your findings. 

On Thu 14 Jun, 2018, 22:11 Kuzhali Velmurugan, <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="iLp2Yh6zCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">kuzhali.v...@...> wrote:

Yes, I face the issue while using TestNG, have added the listener in the XML file. 

 

But am not using the latest version of TestNG.

 

On Thu, 14 Jun 2018 at 8:37 PM, Krishnan Mahadevan <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="iLp2Yh6zCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">krishnan.ma...@gmail.com> wrote:

Do you see the problem when you use TestNG 6.14.3 (latest released version of TestNG)

On Thu 14 Jun, 2018, 17:41 Kuzhali Velmurugan, <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="iLp2Yh6zCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">kuzhali.v...@...> wrote:

Hi,

 

I am facing another issue. 

 

Null Pointer Exception is being thrown in screenshot capture method. Is it because the driver object is not initialized properly?

 

public class ScreenshotOnFailure extends BaseSetup implements IHookable {
 
@Override
public void run(IHookCallBack callBack, ITestResult testResult) {

    callBack.runTestMethod(testResult);
   
if (testResult.getThrowable() != null) {
       
try {
           
takeScreenShot(testResult.getMethod().getMethodName());
        }
catch (IOException e) {
            e.printStackTrace();
        }
    }
}

@Attachment(value = "Failure in method {0}", type = "image/png")
private byte[] takeScreenShot(String methodName) throws IOException {
   
return ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES);
}

 

 

The driver is being used from the base class.

 

Getting exception at the highlighted line.

I have used it as a listener to take screenshot on failure.

 

Kindly share your thoughts.

 

 

Thanks,
Poonkuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium 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="iLp2Yh6zCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">selenium-user...@googlegroups.com.


To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="iLp2Yh6zCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">seleniu...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/selenium-users/7fd57389-4729-425d-86fd-f3e0f11d03ed%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/7fd57389-4729-425d-86fd-f3e0f11d03ed%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/7fd57389-4729-425d-86fd-f3e0f11d03ed%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/selenium-users/7fd57389-4729-425d-86fd-f3e0f11d03ed%40googlegroups.com.
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.

--

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ <a href="http://wakened-cognition.blogspot.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;">http://wakened-cognition.blogspot.com/

My Technical Scribbings @ <a href="http://rationaleemotions.wordpress.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;">http://rationaleemotions.wordpress.com/

--

You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/selenium-users/cEBYO-RaYis/unsubscribe" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/topic/selenium-users/cEBYO-RaYis/unsubscribe&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/topic/selenium-users/cEBYO-RaYis/unsubscribe&#39;;return true;">https://groups.google.com/d/topic/selenium-users/cEBYO-RaYis/unsubscribe.
To unsubscribe from this group and all its topics, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="iLp2Yh6zCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">selenium-user...@googlegroups.com.


To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="iLp2Yh6zCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">seleniu...@googlegroups.com.

To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/selenium-users/CANikZLnUq1AY6br8M0RO9yDyigA3Pzn%2BS0dps-y_W4f%3DK7biBw%40mail.gmail.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/CANikZLnUq1AY6br8M0RO9yDyigA3Pzn%2BS0dps-y_W4f%3DK7biBw%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/CANikZLnUq1AY6br8M0RO9yDyigA3Pzn%2BS0dps-y_W4f%3DK7biBw%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/selenium-users/CANikZLnUq1AY6br8M0RO9yDyigA3Pzn%2BS0dps-y_W4f%3DK7biBw%40mail.gmail.com.


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.

--

 

Regards,

V.Poonkuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium 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="iLp2Yh6zCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">selenium-user...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="iLp2Yh6zCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">seleniu...@googlegroups.com.

To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/selenium-users/CANOO4NbXRsd14pC9opKfwwfNdmm-CBE0bN136-cqNv_EeVi4nw%40mail.gmail.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/CANOO4NbXRsd14pC9opKfwwfNdmm-CBE0bN136-cqNv_EeVi4nw%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/CANOO4NbXRsd14pC9opKfwwfNdmm-CBE0bN136-cqNv_EeVi4nw%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/selenium-users/CANOO4NbXRsd14pC9opKfwwfNdmm-CBE0bN136-cqNv_EeVi4nw%40mail.gmail.com.


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.

--

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ <a href="http://wakened-cognition.blogspot.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;">http://wakened-cognition.blogspot.com/

My Technical Scribbings @ <a href="http://rationaleemotions.wordpress.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;">http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/selenium-users/cEBYO-RaYis/unsubscribe" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/topic/selenium-users/cEBYO-RaYis/unsubscribe&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/topic/selenium-users/cEBYO-RaYis/unsubscribe&#39;;return true;">https://groups.google.com/d/topic/selenium-users/cEBYO-RaYis/unsubscribe.
To unsubscribe from this group and all its topics, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="iLp2Yh6zCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">selenium-user...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="iLp2Yh6zCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">seleniu...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/selenium-users/CANikZLmgaUPxFq2DeK23j6Dz-cqtr3ztbSojVnPdqF-p8fV0Nw%40mail.gmail.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/CANikZLmgaUPxFq2DeK23j6Dz-cqtr3ztbSojVnPdqF-p8fV0Nw%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/CANikZLmgaUPxFq2DeK23j6Dz-cqtr3ztbSojVnPdqF-p8fV0Nw%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/selenium-users/CANikZLmgaUPxFq2DeK23j6Dz-cqtr3ztbSojVnPdqF-p8fV0Nw%40mail.gmail.com.
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.

--

 

Regards,

V.Poonkuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium 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="iLp2Yh6zCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">selenium-user...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="iLp2Yh6zCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">seleniu...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/selenium-users/ae194197-eb1d-49e9-9d9f-792480af08ff%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/ae194197-eb1d-49e9-9d9f-792480af08ff%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/ae194197-eb1d-49e9-9d9f-792480af08ff%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/selenium-users/ae194197-eb1d-49e9-9d9f-792480af08ff%40googlegroups.com.
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 "Selenium 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].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/cdb95c02-ce32-43d5-a867-3c0de8cc8b4e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Parallel execution

Kuzhali Velmurugan

Hi ,



By adding the below 2 highlighted lines, resolved the issue when the screen capture method is added as a listener.

And web driver instance will not be null and screenshot gets attached to allure report.




On Tuesday, 26 June 2018 13:55:00 UTC+5:30, Kuzhali Velmurugan wrote:
Hi,

Actually, the web driver instance in screenshot capture listener class was null.
Initially, as the web driver instance was static, I didn't face this issue.
Now I did a workaround, added an after method in base setup to capture the screenshot when test fails.
This resolved the issue.



On Saturday, 23 June 2018 08:57:30 UTC+5:30, Krishnan Mahadevan wrote:

Please share a full fledged simple standalone test, that can be used to reproduce the problem.

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ <a href="http://wakened-cognition.blogspot.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;">http://wakened-cognition.blogspot.com/

My Technical Scribbings @ <a href="http://rationaleemotions.wordpress.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;">http://rationaleemotions.wordpress.com/

 

From: <[hidden email]> on behalf of Kuzhali Velmurugan <[hidden email]>
Reply-To: <[hidden email]>
Date: Friday, June 22, 2018 at 6:10 PM
To: Selenium Users <[hidden email]>
Subject: Re: [selenium-users] Re: Parallel execution

 

Hi,

 

It didnt seem to work with that version of testNG (6.14.3).

On Thursday, 14 June 2018 22:21:40 UTC+5:30, Kuzhali Velmurugan wrote:

Ok, Thank you. I will try with that version and post on Tuesday(we have long weekend). 

 

On Thu, 14 Jun 2018 at 10:15 PM, Krishnan Mahadevan <[hidden email]> wrote:

Please retry using 6.14.3 and kindly post back your findings. 

On Thu 14 Jun, 2018, 22:11 Kuzhali Velmurugan, <[hidden email]> wrote:

Yes, I face the issue while using TestNG, have added the listener in the XML file. 

 

But am not using the latest version of TestNG.

 

On Thu, 14 Jun 2018 at 8:37 PM, Krishnan Mahadevan <[hidden email]> wrote:

Do you see the problem when you use TestNG 6.14.3 (latest released version of TestNG)

On Thu 14 Jun, 2018, 17:41 Kuzhali Velmurugan, <[hidden email]> wrote:

Hi,

 

I am facing another issue. 

 

Null Pointer Exception is being thrown in screenshot capture method. Is it because the driver object is not initialized properly?

 

public class ScreenshotOnFailure extends BaseSetup implements IHookable {
 
@Override
public void run(IHookCallBack callBack, ITestResult testResult) {

    callBack.runTestMethod(testResult);
   
if (testResult.getThrowable() != null) {
       
try {
           
takeScreenShot(testResult.getMethod().getMethodName());
        }
catch (IOException e) {
            e.printStackTrace();
        }
    }
}

@Attachment(value = "Failure in method {0}", type = "image/png")
private byte[] takeScreenShot(String methodName) throws IOException {
   
return ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES);
}

 

 

The driver is being used from the base class.

 

Getting exception at the highlighted line.

I have used it as a listener to take screenshot on failure.

 

Kindly share your thoughts.

 

 

Thanks,
Poonkuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.


To post to this group, send email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/selenium-users/7fd57389-4729-425d-86fd-f3e0f11d03ed%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/7fd57389-4729-425d-86fd-f3e0f11d03ed%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/7fd57389-4729-425d-86fd-f3e0f11d03ed%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/selenium-users/7fd57389-4729-425d-86fd-f3e0f11d03ed%40googlegroups.com.
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.

--

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ <a href="http://wakened-cognition.blogspot.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;">http://wakened-cognition.blogspot.com/

My Technical Scribbings @ <a href="http://rationaleemotions.wordpress.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;">http://rationaleemotions.wordpress.com/

--

You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/selenium-users/cEBYO-RaYis/unsubscribe" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/topic/selenium-users/cEBYO-RaYis/unsubscribe&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/topic/selenium-users/cEBYO-RaYis/unsubscribe&#39;;return true;">https://groups.google.com/d/topic/selenium-users/cEBYO-RaYis/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-user...@googlegroups.com.


To post to this group, send email to [hidden email].

To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/selenium-users/CANikZLnUq1AY6br8M0RO9yDyigA3Pzn%2BS0dps-y_W4f%3DK7biBw%40mail.gmail.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/CANikZLnUq1AY6br8M0RO9yDyigA3Pzn%2BS0dps-y_W4f%3DK7biBw%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/CANikZLnUq1AY6br8M0RO9yDyigA3Pzn%2BS0dps-y_W4f%3DK7biBw%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/selenium-users/CANikZLnUq1AY6br8M0RO9yDyigA3Pzn%2BS0dps-y_W4f%3DK7biBw%40mail.gmail.com.


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.

--

 

Regards,

V.Poonkuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to [hidden email].

To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/selenium-users/CANOO4NbXRsd14pC9opKfwwfNdmm-CBE0bN136-cqNv_EeVi4nw%40mail.gmail.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/CANOO4NbXRsd14pC9opKfwwfNdmm-CBE0bN136-cqNv_EeVi4nw%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/CANOO4NbXRsd14pC9opKfwwfNdmm-CBE0bN136-cqNv_EeVi4nw%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/selenium-users/CANOO4NbXRsd14pC9opKfwwfNdmm-CBE0bN136-cqNv_EeVi4nw%40mail.gmail.com.


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.

--

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ <a href="http://wakened-cognition.blogspot.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;">http://wakened-cognition.blogspot.com/

My Technical Scribbings @ <a href="http://rationaleemotions.wordpress.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;">http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/selenium-users/cEBYO-RaYis/unsubscribe" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/topic/selenium-users/cEBYO-RaYis/unsubscribe&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/topic/selenium-users/cEBYO-RaYis/unsubscribe&#39;;return true;">https://groups.google.com/d/topic/selenium-users/cEBYO-RaYis/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/selenium-users/CANikZLmgaUPxFq2DeK23j6Dz-cqtr3ztbSojVnPdqF-p8fV0Nw%40mail.gmail.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/CANikZLmgaUPxFq2DeK23j6Dz-cqtr3ztbSojVnPdqF-p8fV0Nw%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/CANikZLmgaUPxFq2DeK23j6Dz-cqtr3ztbSojVnPdqF-p8fV0Nw%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/selenium-users/CANikZLmgaUPxFq2DeK23j6Dz-cqtr3ztbSojVnPdqF-p8fV0Nw%40mail.gmail.com.
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.

--

 

Regards,

V.Poonkuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/selenium-users/ae194197-eb1d-49e9-9d9f-792480af08ff%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/ae194197-eb1d-49e9-9d9f-792480af08ff%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/ae194197-eb1d-49e9-9d9f-792480af08ff%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/selenium-users/ae194197-eb1d-49e9-9d9f-792480af08ff%40googlegroups.com.
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 "Selenium 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].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/92f550fd-1828-4a94-922a-5d149232981e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
12