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

Mate Mrše
  • 4,119
  • 4
  • 23
  • 49
Haroon
  • 1

1 Answers1

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()

Vishal
  • 1,262
  • 7
  • 10