Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • How to get the font size of any text on webpage?

    • 0
    • 4
    • 0
    • 1
    • 0
    • 0
    • 0
    • 0
    • 4.56k
    Comment on it

    We use .getCssValue(attribute) method to get the properties of any webelement.

    We can pass the following attributes:

    1. font-family
    2. font-size
    3. color
    4. line-height
    WebDriver driver = new FirefoxDriver();
            driver.manage().timeouts().implicitlyWait(20L, TimeUnit.SECONDS);

 0 Comment(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: