// Simple method with Assert (send text, verify data and click) public void SignInWithAssert(String userName, String password, String database) { Field1.SendKeys(userName); Field2.SendKeys(password); Assert.AreEqual(DropDown.Text, database); Button.Click(); }
// Simple method (send text and click) public void SignIn(String userName, String password, String database) { Field1.SendKeys(userName); Field2.SendKeys(password); DropDown.SendKeys(database); Button.Click(); }
//Simple method with ExpectedConditions (send text, wait for element and click) public void SignInWithEC(String userName, String password, String database) { Field1.SendKeys(userName); this._wait.Until(ExpectedConditions.ElementToBeClickable(Field2)); Field2.SendKeys(password); DropDown.SendKeys(database); Button.Click(); }