How can I know when the authentication is successful after passing the username and password?
I would like to stop the execution and show once the connection was successful.
This is my code?
driver.Navigate().GoToUrl("MiURL");
var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(20));
List<string> matchingLinks = new List<string>();
IWebElement username = driver.FindElement(By.Name("test"));
userName.SendKeys(c);
IWebElement passwword = driver.FindElement(By.Name("test123"));
userPass.SendKeys(c);
userPass.Submit();
You have to identify on the destination page, some element that tells you that the operation was successful.
Example: if there is an element on the login target screen
<div id="perfil_usuario">Algo</div>
, then look for it. If you find it, the login will have been successful. Otherwise not.