appviewを使用してハイブリッドアンドロイドアプリ内のWebview部分のスクリーンショットを撮りたいと思います。Appiumのみを使用してwebview部分のスクリーンショットを取る方法
次のコードを使用してスクリーンショットを撮りました。
String Screenshotpath = System.getProperty("user.dir") + "/";
System.out.println(Screenshotpath);
File scrFile = ((TakesScreenshot) driver)
.getScreenshotAs(OutputType.FILE);
System.out.println(scrFile);
try {
FileUtils.copyFile(scrFile, new File(Screenshotpath
+ "screenshotwebview" + ".jpg"));
} catch (IOException e) {
e.printStackTrace();
}
これは正常に動作し、画面全体のスクリーンショットをとります。しかし、私はWebViewのにコンテキストを設定し、上記のコードを使用してスクリーンショットを撮るしようしようとすると、それは次のようなエラー
org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command.
Original error: Could not proxy. Proxy error: Could not proxy command to remote server.
Original error: Error: ESOCKETTIMEDOUT (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 0 milliseconds
が、それはWebViewののスクリーンショットを取ることが可能であることを示していますAppiumのみを使用していますか?
助けてもらえますか?
あなたが私の答えをチェックしてもらえますか? – KeLiuyue