How to check if a style has been applied in Selenium IDE

谁说我不能喝 提交于 2019-12-12 10:54:14

问题


I want to check if a particular style has been applied to an element. Preferably using the css selector.

EG:

...
<div id="my_div" style="display: block; background-color:#fff;">
    some content
</div>
...

How do I test that display is block regardless of the background color?


回答1:


Worked it out:

command: assertAttribute or verifyAttribute
Target : css=#my_div@style
value : *display: block*

The asterisk is a wild card.



来源:https://stackoverflow.com/questions/8806747/how-to-check-if-a-style-has-been-applied-in-selenium-ide

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!