Currently Browsing

Posts Tagged ‘ Registry ’

How to use Windows registry value from Selenium WebDriver

The 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, or if you simply want to store and read values from registry. The WindowsUtils class comes handy in these situations.

Read a Windows registry value

We need to import the org.openqa.selenium.os.WindowsUtils class and use the readStringRegistryValue() method for reading a registry value that is represented as a String.