in Selenium by
How to retrieve CSS properties of an element?

1 Answer

0 votes
by

getCssValue() method is used to retrieve CSS properties of any web element

General Syntax:

  driver.findElement(By.id(“id“)).getCssValue(“name of css attribute”);

Example:

   driver.findElement(By.id(“email“)).getCssValue(“font-size”);

...