Created
September 5, 2021 10:14
-
-
Save executeautomation/865ed22a11956fbc88987cafadd6e283 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Theory] | |
[InlineData("admin", "password")] | |
[InlineData("admin", "password2")] | |
[InlineData("admin", "password3")] | |
[InlineData("admin", "password4")] | |
public void TestLoginWithFillData(string username, string password) | |
{ | |
var driver = webDriverFixture.ChromeDriver; | |
testOutputHelper.WriteLine("First test"); | |
driver | |
.Navigate() | |
.GoToUrl("http://eaapp.somee.com"); | |
driver.FindElementByLinkText("Login").Click(); | |
driver.FindElementById("UserName").SendKeys(username); | |
driver.FindElementById("Password").SendKeys(password); | |
var exception = Assert.Throws<NoSuchElementException>( | |
() => driver.FindElementByCssSelector(".btn-defaults") | |
.Click()); | |
exception.Message | |
.Should() | |
.Contain("no such element: Unable"); | |
testOutputHelper.WriteLine("Test completed"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment