How to find size of an element in a webpage with Python Selenium Webdriver?

0 votes
How to find size of an element in a webpage with Python Selenium Webdriver?
Jul 23, 2019 in Selenium by Fawad
373 views

1 answer to this question.

0 votes

Hey Fawad, you can use this piece of code to find an element's size using Python Selenium Webdriver:

from selenium import webdriver
from time import sleep

driver = webdriver.Firefox()
driver.get("http://demos.dojotoolkit.org/dijit/tests/test_Menu.html")
timeout = 10

search_element = driver.find_element_by_id("createDestroyButton")

print(search_element.size)

driver.quit()
answered Jul 29, 2019 by Anvi
• 14,010 points

Related Questions In Selenium

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How to verify color of a web element in Selenium Webdriver?

@Hello Nisha, you can discover the color ...READ MORE

answered Jul 3, 2019 in Selenium by Purnima
1,594 views
0 votes
1 answer

Installing Selenium Webdriver with Python package

Hey Hemant, for installing Selenium Webdriver with ...READ MORE

answered May 8, 2019 in Selenium by Anvi
• 14,010 points
408 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,510 points
1,569 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,870 points
1,501 views
0 votes
1 answer
0 votes
1 answer

How to take Screenshot of a webpage in Selenium with Ruby

Hi Sunita, you can use following code ...READ MORE

answered Aug 26, 2019 in Selenium by Anvi
• 14,010 points
78 views