To check if a checkbox is checked and if so, uncheck it in the Selenium IDE

Asked

Viewed 1,002 times

2

I need to perform a test on the Selenium IDE with the following situation

I have a page where there are 3 columns with multiple rows ( Field name, Status, Editable? )

In my test, I need to check if a certain field of that list is marked with the "Editable" flag, and if so, I need to uncheck it to start the test

Example: My field is in the fifth line of this page, I need to scan the list until I find it and when I do, check if this check-box "Editable" is checked, and if so, uncheck it.

Is there any way to verify this condition ?

1 answer

1

I think it would be easier if you had the code snippet, but see if you can understand: Takes the element, and checks if the property selected of him is true. If it is, you click on it.

elemQueVcQuer = browser.FindElement(By.XPath(".//tr[5]/input[3]");

if (elemQueVcQuer.Selected)
{
   elemQueVcQuer.Click();
}

From what I understand you just want to know how to check whether or not he’s selected, right? If you need a way to sweep the table, put it there with the code, fine?

Hug

Browser other questions tagged

You are not signed in. Login or sign up in order to post.