I'm trying to create a login test for Microsoft Dynamic 365.
I am able to fill in the login form fields, but the Sign in button is disabled until the user moves the mouse cursor
The button has following attributes
<button id="cred_sign_in_button" class="button normaltext cred_sign_in_button refresh_domain_state control-button button-two button_primary" style="opacity: 1;"> Sign in </button>
I tried to set focus on it or move the mouse for some offset using a Selenium Action, but the browser doesn't consider this as the mouse moving. Only if I move the cursor by moving the mouse manually does it become active.
What causes this button to be disabled and how can I change its state?
Here is my code:
driver.Url = "https://identifying365.crm4.dynamics.com"; var Textbox_UserName = driver.FindElement(By.Id("cred_userid_inputtext")); var Textbox_Password = driver.FindElement(By.Id("cred_password_inputtext")); var Button_SignIn = driver.FindElement(By.Id("cred_sign_in_button")); Textbox_UserName.SendKeys("firstname.lastname@example.org"); Textbox_Password.SendKeys("Password"); Button_SignIn.Click(); Thread.Sleep(5000);