示例#1
0
 public <X> X getScreenshotAs(OutputType<X> target) {
   // Get the screenshot as base64.
   String base64 = execute(DriverCommand.SCREENSHOT).getValue().toString();
   // ... and convert it.
   return target.convertFromBase64Png(base64);
 }
 /** {@inheritDoc} */
 @Override
 public <X> X getScreenshotAs(OutputType<X> target) throws WebDriverException {
   String base64 =
       execute(org.openqa.selenium.remote.DriverCommand.SCREENSHOT).getValue().toString();
   return target.convertFromBase64Png(base64);
 }
示例#3
0
 public <X> X getScreenshotAs(OutputType<X> target) throws WebDriverException {
   String base64Png = execute(DriverCommand.SCREENSHOT).getValue().toString();
   return target.convertFromBase64Png(base64Png);
 }