0

I was trying to integrate a selenium test with a windows form app. Code works fine for a button click event. But after chrome driver get open I cant click any thing at the windows form application. Or I even cant drag or click on the windows form GUI. What might be the reason?

  private void button1_Click(object sender, EventArgs e)
        {

            var credentials = ReadCredentials();
   

            foreach (var credential in credentials)
            {

                driver = new ChromeDriver();

                driver.Navigate().GoToUrl("https://xxx.xx.com/");
                driver.Manage().Window.Maximize();

                driver.FindElement(By.Name("user_id")).SendKeys(credential.Item1);
                driver.FindElement(By.Name("password")).SendKeys(credential.Item2);

                driver.FindElement(By.XPath("//*[text()=\"Sign In\"]")).Click();

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.