Full Screen Vs Maximize:: Do you know that in a Selenium we have a fullscreen() method that is different from maximize()?
When maximized (driver.manage().window().maximize()), the title bar etc. of the window is still displayed.
In fullscreen mode (driver.manage().window().fullscreen()), the title bar is not displayed.
Until Selenium 3.x, there were several bug reported that fullscreen() feature doesn’t work mostly (not always) when using ChromeDriver and it throws org.openqa.selenium.UnsupportedCommandException: unknown command. We have a workaround to use ChromeOptions options.addArguments("start-fullscreen") in that case where you get "org.openqa.selenium.UnsupportedCommandException: unknown command" error on using fullscreen().
But in Selenium 4 (alpha 3), fullscreen() works like charm without any issue.
seleniumautomation automationtesting Selenium4
1) Using Java (Lengthy way) : Create a utility and use it:>> import java.io.BufferedOutputStream; import org.openqa.selenium.io.Zip; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; public class UnzipUtil { private static final int BUFFER_SIZE = 4096; public void unzip (String zipFilePath, String destDirectory) throws IOException { File destDir = new File(destDirectory); if (!destDir.exists()) { destDir.mkdir(); } ZipInputStream zipIn = new ZipInputStream(new FileInputStream(zipFilePath)); ZipEntry entry = zipIn.getNextEntry(); // to iterates over entries in the zip folder while (en...
Comments
Post a Comment