I think to use verify you cannot simply replace the word assert with
the word verify in the C# code (or whatever language). I noticed that
when I replaced assertTextPresent with verifyTextPresent in the
Selenese and then re-exported to C#, the resulting code still had the
assertTrue command but it was wrapped in the "try" wording. Something
like this (it's not exact but you get the picture):
BEFORE
assertTrue(x)
AFTER
try {
assertTrue(x)
}
I think I know what you're trying to do, but based on what I've
mentioned above I wouldn't expect replacing assertTrue with verifyTrue
to work the way you're expecting. If you download the IDE and play
with the different types of assertions and exporting them to whatever
language you are using, you'll see what I mean. Hope this helps!
>
http://groups.google.com/group/selenium-users/browse_thread/thread/18...
>
> I think you can find your answer in that link, I had the same problem, now
> I'm catching all the fail asserts in my log file, and I can see the TC as
> failed in the Testrunner
>
> Regards
>
> On Thu, Jul 21, 2011 at 2:30 PM, santosh h s <
santosh.s...@gmail.com> wrote:
>
>
>
>
>
>
>
> > any solutions for this please let me know proper syntax for verify
> > statement
>
> > On Fri, Jul 22, 2011 at 1:01 AM, santosh h s <
santosh.s...@gmail.com>wrote:
>
> >> i tried verify commands but it was showing the error as command not
> >> available.
> >> below is my assert command
> >> assertTrue(selenium.isTextPresent("san"));
> >> i modified the above command to verify as
> >> verifyTrue(selenium.isTextPresent("san")); but this throws an error saying
> >> command is not available, let me know whether syntax is proper or not.
> >> please provide sample Java syntax.
>
> >> On Fri, Jul 22, 2011 at 12:52 AM, Luke Inman-Semerau <
> >>
luke.seme...@gmail.com> wrote:
>
> >>> use verify instead (if you're talking about the individual test case)
>
> >>> would need to know what your test runner is in order to help you if you
> >>> want the test case to fail and all subsequent tests to still run
>