Bug Reports

Use this forum to report problems you are having with Twist and to seek resolution with fellow community members

This is a public Discussion Area  publicRSS

Post

    James O'Sullivan
    ERROR: Problem capturing screenshot: null
    Post posted March 5, 2009 by James O'Sullivan
    3426 Views, 5 Comment
    Topic:
    ERROR: Problem capturing screenshot: null
    Body:

    Hi,

    I'm trying to use the selenium captureScreenshot method to get a screenshot at a particular part of a test run. 

    When selenium.captureScreenshot("c:\tmp\test.png") gets executed I get the error below:

    com.thoughtworks.selenium.SeleniumException: ERROR: Problem capturing screenshot: null
        at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:73)
        at com.thoughtworks.selenium.DefaultSelenium.captureScreenshot(DefaultSelenium.java:546)
        at vsm.ReportActions.saveAliquots(ReportActions.java:173)
    C:\Program Files\twist\workspace\VSM\scenarios\Report Released Tissue.scn:13

    Any ideas?

    Thanks

    Comment

    • Nivetha
      posted March 6, 2009 by Nivetha

      Hi James,

      Generally, you get this error when the folder doesnt exist ("tmp" in your case). Try with some existing folder and let us know.

      Thanks.

    • James O'Sullivan
      posted March 20, 2009 by James O'Sullivan

      Hi Nivetha,

      c:\tmp does exist I also tried \tmp but this didn't work either.  I also tried just specifying selenium.captureScreenshot("test.png") and that did work, but isn't optimal as I want to put them in a separate directory.

    • selvan
      posted March 23, 2009 by selvan

      It didn't work as "\" (backslash) is escape character in Java.You should use "\\" (two consecutive backslash) or "/" forward slash as your directory seperator. For example, you may specify as,

      selenium.captureScreenshot("c:\\tmp\\test.png")

      or

      selenium.captureScreenshot("c:/tmp/test.png")

    • James O'Sullivan
      posted March 23, 2009 by James O'Sullivan

      ok that's embarrassing.  I'll try it out later.  Thanks!

    • Govind
      posted August 31, 2009 by Govind

      Hi i am using Twist to automate my application, i have a batch file which executes around 20 twist customer journeys it will take almost 1hour to execute all journeys, in the mean time i will be login to some other server and do some work in that server machine and come back again to my twist scenarios running server machine, because of that i will not get some scenarios screen shot properly(it will be dark), if i stay in the same twist running server machine without going to any server machine i will get screenshots properly so can you help me solve this problem?