Assert in Selenium C#

后端 未结 8 761
[愿得一人]
[愿得一人] 2021-01-07 11:45

Is there a Assert class present in Selenium C# just like we have in Coded UI test.

Or I should use the Microsoft.VisualStudio.TestTools.UnitTesting.Asser

8条回答
  •  说谎
    说谎 (楼主)
    2021-01-07 12:18

    Yes, you would use the Assert class in your unit test framework, in your case MSTest.

    The Selenium library doesn't have responsibility over test framework type of functions, including asserts.

    You can use FluentAssertions which supports many different frameworks including MSTest which might minimize changes needed if you need to switch frameworks for any reason.

提交回复
热议问题