public void ThenInputValueToTheFieldNameAsBelowAndShouldGetMsg(Table table) { string inputString = ""; string expectMsg = ""; string fieldName = ""; foreach (var row in table.Rows) { inputString = row["inputValue"].ToString(); expectMsg = row["msg"].ToString(); fieldName = row["fieldName"].ToString(); switch (fieldName) { case "email": registerPage.EmailEnter(inputString); registerPage.LoginErrMsgDisplayed(expectMsg, fieldName); break; case "username": registerPage.UsernameEnter(inputString); registerPage.LoginErrMsgDisplayed(expectMsg, fieldName); break; case "password": registerPage.PasswordEnter(inputString); registerPage.LoginErrMsgDisplayed(expectMsg, fieldName); break; case "captchaCode": registerPage.CaptchaCodeEnter(inputString); registerPage.LoginErrMsgDisplayed(expectMsg, fieldName); break; case "userterm": registerPage.UserTermsSelect(inputString); registerPage.RegisterBtnClick(); registerPage.LoginErrMsgDisplayed(expectMsg, fieldName); break; } } }
public void WhenClickRegisterButton() { registerPage.RegisterBtnClick(); }