How to Using Webdriver Selenium to get the value of “style” element

后端 未结 3 1990
醉酒成梦
醉酒成梦 2020-12-06 02:32

I want to check whether the value of a style element is greater than a particular value (i.e., is left > 666px ?), but I am unable to get ahold of the value.

Here is

3条回答
  •  眼角桃花
    2020-12-06 03:02

    driver.findElement(By.locator( yourLocator )).getAttribute( requiredAttribute )
    

    It will return String

提交回复
热议问题