0

How can I find out which version of geckodriver I use?

from selenium import webdriver
driver = webdriver.Firefox()

Not sure if the new one is used or the old one when I use:

sys.path.append(self.driver_dir)

Thanks in advance

oxidworks
  • 1,563
  • 1
  • 14
  • 37
  • I place the geckodriver in the same directory where my code is. That way there is no confusion about the version. – Joe T. Boka Apr 13 '18 at 01:31

2 Answers2

0

You can get capabilities of driver by below code:

from selenium import webdriver
driver = webdriver.Firefox()
print driver.capabilities

It will print driver related info in dictionary form, which would also have info about driver version.

Chanda Korat
  • 2,453
  • 2
  • 19
  • 23
0

This question is also found here: How do you get the geckodriver version from python selenium firefox webdriver?

browser = webdriver.Firefox
print(browser.capabilities)

The output contains 'moz:geckodriverVersion' where the version can be found.

Laura
  • 1
  • 3