0

I've been writing a couple of tests using selenium for my website. However, I've not found a way to test multiselect dropdown with checkboxes that is filled by V-autocomplete(vuetifyjs) component . As an example, I want to select one of the locations that is displayed in an V-auto-complete list dropdown.

driver.find_elements_by_xpath(//*[contains(@class, 'v-autocomplete')])

enter image description here

2
0

According to software testing solutions, you need to perform the following steps:-

  1. Navigate to the desired dropdown and click on the same.

    driver.find_element_by_xpath("//desired xpath")

  2. Get all the checkboxes in a webelement on the basis of a common property.

    checkBoxes = driver.find_elements_by_xpath("type='checkbox'")

  3. Run a loop on "checkBoxes" and use the get method to fetch the name/id of each and every checkbox.

    for c in checkBoxes:

    if(c.text() == desired_checkbox):

    c.click()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.