Explore Courses Blog Tutorials Interview Questions
0 votes
in DevOps and Agile by (19.7k points)

How would I get the browser version being used?

>>> from selenium import webdriver

>>> driver = webdriver.Firefox()

>>> print version <-- how to do this?

    Firefox 12.0

1 Answer

0 votes
by (62.9k points)

The capabilities property is a dictionary containing information about the browser, so if you are using Chrome then this should work:

print driver.capabilities['version']

And if you are using Firefox, the following should work:


If you are interested to learn Selenium on a much deeper level and want to become a professional in the testing domain, check out Intellipaat’s Selenium training

Browse Categories