Select Drop-down list using select_by_index() in Selenium - Python Last Updated : 11 Oct, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report Prerequisite: Browser Automation Using Selenium Selenium is an effective device for controlling an internet browser through the program. It is purposeful for all browsers, works on all fundamental OS and its scripts are written in numerous languages i.e Python, Java, C#, etc, we will be using Python. Requirement: You need to download install chrome driver from here Click Here and set path. Working with Drop-down list: Initially you have to import the Select class and afterward you have to make the case of Select class. After making the case of Select class, you can perform select strategies on that occasion to choose the choices from dropdown list. Importing Select class: from selenium.webdriver.support.ui import Select For selection: drop=Select(driver.find_element_by_id(' ') drop.select_by_index() Step-by-step approach: Import webdriver from selenium module. Python3 # Import required module from selenium import webdriver Import Select class module. Python3 # Importing Select class from selenium.webdriver.support.ui import Select Using a web page for drop down list(example: URL).Navigate the id of option bar.In html, index starts from 0. Here we will select index value 2 for id RESULT_RadioButton-9. Python3 # Select by index drop.select_by_index(2) Below is the complete program of the above approach: Python3 # Import required module import time from selenium import webdriver # Import Select class from selenium.webdriver.support.ui import Select # Using chrome driver driver = webdriver.Chrome() # Web page url driver.get("https://fs2.formsite.com/meherpavan/form2/index.html?1537702596407") # Find id of option x = driver.find_element_by_id('RESULT_RadioButton-9') drop = Select(x) # Select by index drop.select_by_index(2) time.sleep(4) driver.close() Output: Comment More infoAdvertise with us Next Article find_element_by_css_selector() driver method - Selenium Python P praveeny182 Follow Improve Article Tags : Python Python-selenium Practice Tags : python Similar Reads Selecting a drop-down list by using the Selenium.select_by_visible_text() method in Python Selenium is an effective device for controlling an internet browser through the program. It is purposeful for all browsers, works on all fundamental OS and its scripts are written in numerous languages i.e Python, Java, C#, etc, we can be running with Python. Different methods of Select class: Selec 2 min read How to select a drop-down menu value using Selenium in Python? Prerequisite: Browser Automation Using Selenium Selenium is an effective device for controlling an internet browser through the program. It is purposeful for all browsers, works on all fundamental OS and its scripts are written in numerous languages i.e Python, Java, C#, etc, we will be using Python 2 min read How to scrape multiple pages using Selenium in Python? As we know, selenium is a web-based automation tool that helps us to automate browsers. Selenium is an Open-Source testing tool which means we can easily download it from the internet and use it. With the help of Selenium, we can also scrap the data from the webpages. Here, In this article, we are g 4 min read find_element_by_css_selector() driver method - Selenium Python Selenium's Python Module is built to perform automated testing with Python. Selenium Python bindings provide a simple API to write functional/acceptance tests using Selenium WebDriver. After you have installed selenium and checked out - Navigating links using the get method, you might want to play m 2 min read find_elements_by_css_selector() driver method - Selenium Python Selenium's Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium WebDriver. After you have installed selenium and checked out - Navigating links using get method, you might want to play more 2 min read Check High School Result using Selenium in Python We are going to study check high school result status pass or fail by using selenium. This is very useful for schools because when they check how many student pass-fail and what is the name of a fail student. If the student amount is 10 and less than 10 then check easily by manual when if the number 3 min read Like