diff --git a/bindings/src/Capgemini.PowerApps.SpecFlowBindings/Steps/LoginSteps.cs b/bindings/src/Capgemini.PowerApps.SpecFlowBindings/Steps/LoginSteps.cs index 9a17eb43..0077149a 100644 --- a/bindings/src/Capgemini.PowerApps.SpecFlowBindings/Steps/LoginSteps.cs +++ b/bindings/src/Capgemini.PowerApps.SpecFlowBindings/Steps/LoginSteps.cs @@ -35,8 +35,13 @@ public static void Login(IWebDriver driver, Uri orgUrl, string username, string usernameInput.SendKeys(Keys.Enter); IWebElement passwordInput = driver.WaitUntilClickable(By.XPath(Elements.Xpath[Reference.Login.LoginPassword]), 30.Seconds()); - passwordInput.SendKeys(password); - passwordInput.Submit(); + + // check to see if password is needed as it isn't needed in SSO scenario + if (passwordInput != null) + { + passwordInput.SendKeys(password); + passwordInput.Submit(); + } var staySignedIn = driver.WaitUntilClickable(By.XPath(Elements.Xpath[Reference.Login.StaySignedIn]), 10.Seconds()); if (staySignedIn != null)