public void YandexLogin_ValidCredentials(BrowserType browser) { mainPage.MailLoginClick(); windowActions.SwitchBetweenWindows(WebDriver, 1); loginPage.EnterLogin(TestData.validLogin); loginPage.ClickSignIn(); loginPage.EnterPassword(TestData.validPassword); loginPage.ClickSignIn(); var userName = mailIncomingMessagesPage.GetUserName(); Assert.Multiple(() => { Assert.NotNull(userName, "User name is null"); Assert.AreEqual(TestData.validLogin, userName, "User names are not equal"); }); }