开发者

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']");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜