WindowsUtils class provides various methods to interact with the registry on the Windows operating system. While running tests on the Windows operating system and Internet Explorer, the test might need to read and modify IE settings or there may be a need to get some settings related to the web server or database from the registry in tests. The
WindowsUtils class comes handy in these situations.
In this recipe, we will use
WindowsUtil to read the exact name of the operating system on which the test is running. We might need this information printed in our test logs.
We need to import the
org.openqa.selenium.os.WindowsUtils class and use the
readStringRegistryValue() method ...