verifyTrue(selenium.isTextPresent("blah")); not failing and it should be!! TestNG - Java Driver

128 views
Skip to first unread message

confusa

unread,
Feb 13, 2009, 3:50:59 PM2/13/09
to selenium-users...@googlegroups.com
Running a Java TestNG based test in Selenium RC. I have a page I know does not contain the text "blah" but this command is not failing:

verifyTrue(selenium.isTextPresent("blah"));

Why isn't this failing? Any ideas?

ramadan s

unread,
Feb 15, 2009, 3:58:18 PM2/15/09
to selenium-users...@googlegroups.com
are you inclinedto use assert insted of verify
{quote}assertTrue(selenium.isTextPresent("blah"));{quote}
I think it definitely will fail.

{font:style=color: #800000;}+* \\*+{font}
{font:style=color: #800000;}+*Regards,*+ {font}
{font:style=color: #800000;}+*Ramadan Salibryam*+ {font}

Tarun

unread,
Feb 16, 2009, 12:42:22 AM2/16/09
to selenium-users...@googlegroups.com
This is because you have not checked for verification error.

Call method checkForVerificationErrors();  as the last statement of your test method.
This should get you going...

Thanks
Tarun K

Reply all
Reply to author
Forward
0 new messages