vendredi 1 mai 2020

how to FIX "could not be scrolled into view' radio button in C# Selenium

The error says that element could not be scrolled to the view. Thank you for your help :)

below is the code:

enter image description here

  IList<IWebElement> rdBtn_Country = driver.FindElements(By.Name("ContactDetails$StreetAddress$Country"));

        Boolean cValue = false;

        cValue = rdBtn_Country.ElementAt(0).Selected;

        if (cValue == true)
        {
            rdBtn_Country.ElementAt(1).Click();
        }
        else
        {
            rdBtn_Country.ElementAt(0).Click();
        }

Aucun commentaire:

Enregistrer un commentaire