Selenium UI example getcssvalue

In selenium jar package, in the interface of webelement,

String getCssValue(String var1);可以通过标签,获取对应的css值。具体要怎么用呢,如下:
WebElement baidu = driver.findElement(By.id("su"));su.getCssValue("font-size")
打印出来的结果:

Through chrome verification, please click the computed attribute to see:

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>