2011-09-28 48 views

回答

0

如果文本对齐是直接用HTML编码的,你可以使用assertElementPresent()方法和合适的XPath定位器来做你想做的事情。例如,要检查以下内容

<p id="paragraph" align="right">Text text text text text text text</p> 

你可以使用

selenium.isElementPresent("//p[@id='paragraph' and @align='right']");