How to get coordinates of a web element using Python Selenium?

How to get coordinates of a web element using Python Selenium?

Hello Toby-steed,

You can use the following code snippet to understand how to get the coordinates of a web element:

driver = webdriver.Firefox()
element = driver.find_element_by_xpath("//xpath")
location = element.location
print(location)