How would I get the browser version being used?
>>> from selenium import webdriver
>>> driver = webdriver.Firefox()
>>> print vers
If your wrapping your WebDriver so that it is EventFiring you'll have to do a custom EventFiringWebDriver implementation.
import org.openqa.selenium.Capabilities;
import org.openqa.selenium.HasCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.support.events.EventFiringWebDriver;
public class MyEventFiringWebDriver extends EventFiringWebDriver implements HasCapabilities {
private RemoteWebDriver driver;
public MyEventFiringWebDriver(RemoteWebDriver driver) {
super(driver);
this.driver = driver;
}
@Override
public Capabilities getCapabilities() {
return driver.getCapabilities();
}
}
Just posting because it was a problem I ran across.
If you are using Chrome you can do the following:
driver.capabilities['version']
And if you are using Firefox:
driver.capabilities['browserVersion']