简体   繁体   English

如何使用java测试selenium中的css属性

[英]how to test a css property in selenium using java

I want to test that a certain text present on my page is BOLD in appearance. 我想测试一下我的页面上出现的某些文字是否显示为BOLD like labels for all mandatory fields are presented in BOLD . 所有必填字段的标签都以粗体显示。 I am using java to write my selenium testscripts and execute the tests with selenium RC. 我正在使用java编写我的selenium testscripts并使用selenium RC执行测试。 The problem is that HTML tab on firebug tells nothing about CSS properties. 问题是firebug上的HTML选项卡没有说明CSS属性。 All CSS properties of an element are listed on the CSS tab of firebug. 元素的所有CSS属性都列在firebug的CSS选项卡上。

If you would have entered your question in google you would have founds lots of answers. 如果您在谷歌中输入了自己的问题,那么您会找到很多答案。

This is one tutorial that will help you: http://sauceio.com/index.php/2010/01/selenium-totw-css-selectors-in-selenium-demystified/ 这是一个可以帮助您的教程: http//sauceio.com/index.php/2010/01/selenium-totw-css-selectors-in-selenium-demystified/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM