Can I select multiple options from a dropdown using Python Selenium webdriver?

0 votes
Can I select multiple options from a dropdown using Python Selenium webdriver?
Jul 30 in Selenium by Dhwani
175 views

1 answer to this question.

0 votes

Hi Dhwani, you can use following code snippet to select multiple options from a dropdown using python selenium webdriver:

driver=new firefoxdriver();
driver.get('https://www.drivezy.in/')
select = Select(driver.findElement(by.cssSelector("select[multiple='multiple']"))

select.select_by_visible_text("BMW")
select.select_by_visible_text("Saab")
select.select_by_visible_text("Mercedes")
driver.quit()
answered Jul 30 by Abha
• 25,240 points

Related Questions In Selenium

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Select an item from a dropdown list using Selenium WebDriver

Use this then it will work - new ...READ MORE

answered Apr 9, 2018 in Selenium by Vardy
• 2,250 points
2,418 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,090 points
780 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
1,025 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
727 views
0 votes
1 answer

How can I select date from a datepicker div using Selenium Webdriver?

Hey Jeevika, you can use following automation ...READ MORE

answered Jul 15 in Selenium by Abha
• 25,240 points
110 views