FAQ
Hi,
I am new to C# and selenium, (previoulsy used watir and ruby).

I cannot seem to find any way to Verify results using C#, as opposed
to Assertions which stop the rest of the test executing. I noticed on
the selenium website that there is this capability.
Does anyone have any experience with this.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.

Search Discussions

  • Moises Siles at May 8, 2012 at 5:02 pm
    I think you should need some test framework like nunit, mstest, mbunit
    On Tue, May 8, 2012 at 4:25 AM, dt_nz wrote:

    Hi,
    I am new to C# and selenium, (previoulsy used watir and ruby).

    I cannot seem to find any way to Verify results using C#, as opposed
    to Assertions which stop the rest of the test executing. I noticed on
    the selenium website that there is this capability.
    Does anyone have any experience with this.

    --
    You received this message because you are subscribed to the Google Groups
    "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to
    selenium-users+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/selenium-users?hl=en.
    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.
  • MArk B. at May 8, 2012 at 5:13 pm

    On May 8, 10:02 am, Moises Siles wrote:
    I think you should need some test framework like nunit, mstest, mbunit
    What he said plus you can put in a try-catch around it if you want to.
    That can trap the error thrown by the Assert.

    Clue us in to what you're using as a framework and/or what your script
    structure is and we could help more.

    MArk B.

    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.
  • Dt_nz at May 9, 2012 at 10:46 am
    I am using Nunit in Visual Studio. I have tried running the tests with
    the reshaprper plugin, and the nunit gui with a try-catch but the
    assertion failure doesnt get reported at the end.

    so for example

    try
    {

    Assert.IsTrue(SetUpBrowser.VerifyTextPresent("bluemoon"));
    }
    catch (Exception)
    {

    Console.Write("Test Errored...");
    }

    The assertion fails, but the report results does not contain the
    error.

    Let me know if you need more info.

    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.
  • Dt_nz at May 15, 2012 at 9:09 pm
    Does anyone have any experience with verifys in C#?

    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.
  • Ashok Tulachan at May 16, 2012 at 12:10 am
    Instead of using Assert or verify, i create
    custom WaitforIsVisible(#element) method from selenium and use if else
    statement for my scenarios.

    Not sure if that will help you.


    On Tue, May 15, 2012 at 4:09 PM, dt_nz wrote:

    Does anyone have any experience with verifys in C#?

    --
    You received this message because you are subscribed to the Google Groups
    "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to
    selenium-users+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/selenium-users?hl=en.

    --
    Regards,

    Ashok Tulachan

    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.
  • Moises Siles at May 16, 2012 at 1:39 pm
    Did you see the text in the console?

    Console.Write("Test Errored...");
    On Wed, May 9, 2012 at 4:46 AM, dt_nz wrote:


    I am using Nunit in Visual Studio. I have tried running the tests with
    the reshaprper plugin, and the nunit gui with a try-catch but the
    assertion failure doesnt get reported at the end.

    so for example

    try
    {

    Assert.IsTrue(SetUpBrowser.VerifyTextPresent("bluemoon"));
    }
    catch (Exception)
    {

    Console.Write("Test Errored...");
    }

    The assertion fails, but the report results does not contain the
    error.

    Let me know if you need more info.

    --
    You received this message because you are subscribed to the Google Groups
    "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to
    selenium-users+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/selenium-users?hl=en.
    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.
  • Gulshan Saini at May 16, 2012 at 4:41 am
    You can look at this example in Java and convert it into C#
    http://seleniumexamples.com/blog/guide/using-soft-assertions-in-testng/

    Thanks
    Gulshan
    On Tuesday, 8 May 2012 15:55:37 UTC+5:30, dt_nz wrote:

    Hi,
    I am new to C# and selenium, (previoulsy used watir and ruby).

    I cannot seem to find any way to Verify results using C#, as opposed
    to Assertions which stop the rest of the test executing. I noticed on
    the selenium website that there is this capability.
    Does anyone have any experience with this.
    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/_sIR2wTCNw8J.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupselenium-users @
categoriesselenium
postedMay 8, '12 at 5:00p
activeMay 16, '12 at 1:39p
posts8
users5
websiteseleniumhq.org

People

Translate

site design / logo © 2022 Grokbase