标签:page bdr find xpath fail javadoc javase ati 判断
public static void assertTrue(String message,boolean condition)
Asserts that a condition is true. If it isn‘t it throws anAssertionError
with the given message.
示例:
boolean value=webDriver.findElement(By.xpath("......")).isDisplay(); //判断是否显示xx
assertTrue("Failed to go to the Login page", value);
如果value的值是true则运行成功,如果value的值是false则运行失败并打印出信息“Failed to go to the Login page”。
public static void assertTrue(boolean condition)
AssertionError
without a message.标签:page bdr find xpath fail javadoc javase ati 判断
原文地址:http://www.cnblogs.com/meimeilove/p/7279318.html