Ejemplo n.º 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);
 }
Ejemplo n.º 2
0
 /** {@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);
 }
Ejemplo n.º 3
0
 public <X> X getScreenshotAs(OutputType<X> target) throws WebDriverException {
   String base64Png = execute(DriverCommand.SCREENSHOT).getValue().toString();
   return target.convertFromBase64Png(base64Png);
 }