Menu

screenshot of test page only not desktop

2009-04-13
2013-05-14
  • oohayf oohayl

    oohayf oohayl - 2009-04-13

    hello, how can i take screenshot of testing page only and not the full desktop? thx!

     
    • Paul

      Paul - 2009-08-24

      hey, you can use captureEntirepageScreenshot but, this wont be included in the test report due to the class files not looking for this command, I've asked for the class files to be updated to include this.

       
  • Mark

    Mark - 2009-11-04

    Slight bug in this

    I found answer to this here.

    http://clearspace.openqa.org/message/70176

    need double call as only captureScreenshot will show up in results.html page as link to image, captureEntirePageScreenshot will take image of the browser that the test is running in.

    HTH

    Regards

    Mark

    selenium.captureScreenshot(WebsiteBaseTest.SCREENSHOTS_RESULTS_PATH
                    + File.separator
                    + methodName + "_"
                    + LoggingUtils.timeStampForFileName()
                    + ".png");
    selenium.captureEntirePageScreenshot(WebsiteBaseTest.SCREENSHOTS_RESULTS_PATH
                    + File.separator
                    + methodName + "_"
                    + LoggingUtils.timeStampForFileName()
                    + ".png",GlobalConstants.CAPTUREENTIREPAGESCREENSHOT_BACKGROUND);
       

     
  • Cinderella

    Cinderella - 2009-12-02

    3# is a tricky method. I use this to solve the problem.

    Hope LoggingSelenium can include captureEntirepageScreenshot()  function in next version.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.