开发者

Selenium SeleniumTestCase .checkForVerificationErrors method : output status before it fails

I am testing a table on a webpage where i need to verify all values in table. For this i have written a for loop something like this

for (row) {
   for (column) {
       SeleniumTestCase.verifyTrue( "expected".equals("obtained"));
   }
   SeleniumTestCase.checkForVerificationErrors();
}

Here in the fifth line i am checking was their any error in any of the columns at this row.

Problem is if their is any error, i can not output at 开发者_StackOverflowwhich row and columns error was detected as checkForVerificationErrors method will fail immediately without letting me to output any debugging information.


You can use the JUnit TestCase assertions instead:

for (row) {
   for (column) {
       SeleniumTestCase.assertEquals("Verifying row " + row + ", column " + column, 
               expected, obtained);
   }
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜