Hi all,
i am using Selenium Webdriver within Visual Studio and using C# programming Language.
So i created a script to enter user name password and then select log in. ( it does all of that ) but it wont log me in instead it tells me it received a bad request.
I am trying to log into Microsoft 365. So here is the code Below
[TestMethod]
public void login()
{
NavigationHelper.NavigateToURL(ObjectRepository.Config.GetWebsite());
IWebElement login = ObjectRepository.Driver.FindElement(By.Id("cred_userid_inputtext"));
login.SendKeys("User001");
login = ObjectRepository.Driver.FindElement(By.Id("cred_password_inputtext"));
login.SendKeys("Pass");
login = ObjectRepository.Driver.FindElement(By.Id("cred_sign_in_button"));
login.SendKeys(Keys.Return);
}
i Tried to put wait times but it did not work. am not sure WHY this is happening. Maybe a javascript load issue ?
Can someone please help me with this syntax if it is invalid.
However as i mentioned earlier when i open the browser and enter the same Credentials it logs me in just fine.
Thank YOU !