How to check alignment of text using selenium RC
verify alignment of text or any other element in web page using selenium rc. i use python, is there any budy who can he开发者_如何转开发lp with this.
you can utilize getAttribute command for example
String align = selenium.getAttribute("ele_locator@align");
In case text alignment is coded directly in HTML you could do what you want using the assertElementPresent()
method and a suitable XPath locator. For example to check the following text
<p id="paragraph" align="right">Text text text text text text text</p>
you could use
selenium.isElementPresent("//p[@id='paragraph' and @align='right']");
精彩评论