When I print my Webdriver reference variable, I get the following value,
ChromeDriver: chrome on XP (d4631482441c5b7fd464863f70aba801)
Can someone explain in detail about what these values mean individually?
When I print my Webdriver reference variable, I get the following value,
ChromeDriver: chrome on XP (d4631482441c5b7fd464863f70aba801)
Can someone explain in detail about what these values mean individually?
Once the ChromeDriver successfully instantiates a Chrome Browsing Context, if you print the the instance of the WebDriver variant i.e. the ChromeDriver:
System.setProperty("webdriver.chrome.driver", "C:\\Utility\\BrowserDrivers\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
System.out.println(driver);
The console output is:
ChromeDriver: chrome on WINDOWS (34992f3b864a9063bf5fe90e4e09345e)
The components of the output are as follows:
ChromeDriver
: Represents the WebDriver variant.WINDOWS
: Represents the Platform variant.34992f3b864a9063bf5fe90e4e09345e
: Represents the SessionID of the Browsing Context.You see the toString()
of RemoteWebDriver
, which ChromeDriver
inherits from. ChromeDriver
doesn't override it so you see the parent implementation
@Override
public String toString() {
return String.format("%s: %s on %s (%s)", getClass().getSimpleName(), caps.getBrowserName(), platform, getSessionId());
}
getClass().getSimpleName()
= ChromeDriver
caps.getBrowserName()
= Chrome
platform
= Windoes XP
getSessionId()
= d4631482441c5b7fd464863f70aba801