phamow / fest

Automatically exported from code.google.com/p/fest
0 stars 0 forks source link

Screenshot of modal dialog cannot be taken properly in jenkins #319

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Simulate an event which displays modal dialog. 
2. Take screenshot with ScreenShotTaker.

What is the expected output? What do you see instead?
In local, the screenshot is taken properly.
In jenkins, the screenshot is taken but the modal dialog is blank.
I would expect dialog shall be correctly displayed in screenshot in jenkins.

What version of the product are you using? On what operating system?
org/easytesting/fest-swing/1.2.1/fest-swing-1.2.1-sources.jar

Please provide any additional information below.
- If dialog is not modal, this problem does not occur.
- FailOnThreadViolationRepaintManager found no issue
- The method i use to take screnshot;
public void takeScreenshot(String imageFileName, Exception e) throws Exception {
        ScreenshotTaker screenshotTaker = new ScreenshotTaker();         
        String currentFolderPath = currentFolder().getCanonicalPath();

        File imageFolder = new File(currentFolderPath + separator + "failed-gui-tests");
        String imageFolderPath = imageFolder.getCanonicalPath() + separator;
        screenshotTaker.saveDesktopAsPng(imageFolderPath + imageFileName);
        if(e != null) {
            throw e;
        }
    }

Original issue reported on code.google.com by bsce...@gmail.com on 30 Dec 2014 at 2:38