Class ImageUtils


  • public class ImageUtils
    extends Object
    Provides logic for screenshot and image manipulation and conversion.
    • Constructor Detail

      • ImageUtils

        public ImageUtils​(org.openqa.selenium.WebDriver driver)
    • Method Detail

      • getDriver

        public org.openqa.selenium.WebDriver getDriver()
      • handleAlertAndTakeScreenshot

        public byte[] handleAlertAndTakeScreenshot()
        Accepts the current alert window and takes a screenshot.

        The FluentLenium logo is also added on to the screenshot.

        Returns:
        the screenshot as a byte array
        Throws:
        ScreenshotNotCreatedException - if a problem occurred during reading the screenshot file