-1

デバイスのスクリーンショットを撮っているときにエラーの例外が発生します

以下のように私のコード:

//open the page
driver.get("http://wikipedia.com");
//take another screenshot
try {
        File screenshot = new File("screenshot1.png");
            File tmpScreenshot = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);           
        }
        catch(IOException e){
            System.out.println("Failed to take screenshot."+e.getMessage());
        }

        //quit
        driver.quit();
    }

この問題を解決してくれる団体はありますか?

4

1 に答える 1