/
LoginTests.java
34 lines (27 loc) · 1.28 KB
/
LoginTests.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package tests;
import org.testng.annotations.Test;
import java.lang.reflect.Method;
import static utils.extentreports.ExtentTestManager.startTest;
public class LoginTests extends BaseTest {
@Test(priority = 0, description = "Invalid Login Scenario with wrong username and password.")
public void invalidLoginTest_InvalidUserNameInvalidPassword(Method method) {
//ExtentReports Description
startTest(method.getName(), "Invalid Login Scenario with invalid username and password.");
homePage
.goToN11()
.goToLoginPage()
.loginToN11("onur@swtestacademy.com", "111222334443313")
.verifyLoginPassword("E-posta adresiniz veya şifreniz hatalı");
}
@Test(priority = 1, description = "Invalid Login Scenario with empty username and password.")
public void invalidLoginTest_EmptyUserEmptyPassword(Method method) {
//ExtentReports Description
startTest(method.getName(), "Invalid Login Scenario with empty username and password.");
homePage
.goToN11()
.goToLoginPage()
.loginToN11("", "")
.verifyLoginUserName("Lütfen e-posta adresinizi girin.")
.verifyLoginPassword("WRONG MESSAGE FOR FAILURE!");
}
}