Hi,

Can you please let me know how can I take a screen shot when ever an error
occurs ?I am using webdriver and TestNg.


Regards
Praneeth

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/NFkWff2X5a0J.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Peter Gale at Aug 11, 2012 at 5:07 pm
    If it's knowing how to take a screenshot in java that you need to knwo how to do, then this is explained in many threads here and on the wiki. See this thread for example: https://groups.google.com/forum/#!topic/selenium-users/aG86La7Nh6A[1-25]

    If it's how to trigger this in TestNG after an error is detected that you need to know then that's a TestNG question that you should ask on a TestNG site, but you might also find an answer by searching the past treads here.

    Date: Sat, 11 Aug 2012 09:14:43 -0700
    From: praneeth459@googlemail.com
    To: selenium-users@googlegroups.com
    Subject: [selenium-users] Error Screen shot in web driver

    Hi,

    Can you please let me know how can I take a screen shot when ever an error occurs ?I am using webdriver and TestNg.


    Regards
    Praneeth




    --

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

    To post to this group, send email to selenium-users@googlegroups.com.

    To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/NFkWff2X5a0J.

    For more options, visit https://groups.google.com/groups/opt_out.






    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Darrell Grainger at Aug 13, 2012 at 3:25 am
    Have a look
    at http://darrellgrainger.blogspot.ca/2011/02/generating-screen-capture-on-exception.html.
    This might be what you are looking for.
    On Saturday, 11 August 2012 12:14:43 UTC-4, praneeth kumar wrote:

    Hi,

    Can you please let me know how can I take a screen shot when ever an error
    occurs ?I am using webdriver and TestNg.


    Regards
    Praneeth
    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/nxd84qgE3qAJ.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Anji prassana at Aug 13, 2012 at 4:42 am
    File screenshotfile=new File("abc.jpg");
    File tmp=((TakesScrrenshotd)driver).getScreenshotAs(OutType.FILE);
    FileHandler.Copy(tmp,screenshotfile);

    On Sat, Aug 11, 2012 at 9:44 PM, praneeth kumar
    wrote:
    Hi,

    Can you please let me know how can I take a screen shot when ever an error
    occurs ?I am using webdriver and TestNg.


    Regards
    Praneeth

    --
    You received this message because you are subscribed to the Google Groups
    "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to
    selenium-users+unsubscribe@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msg/selenium-users/-/NFkWff2X5a0J.
    For more options, visit https://groups.google.com/groups/opt_out.



    --
    Thanks&Regards
    Anjaneyulu P
    "The way you see the things is the way to think and is the way you react
    upon!!"

    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupselenium-users @
categoriesselenium
postedAug 11, '12 at 4:14p
activeAug 13, '12 at 4:42a
posts4
users4
websiteseleniumhq.org

People

Translate

site design / logo © 2022 Grokbase