Check CBSE result using Selenium in Python Last Updated : 25 Jan, 2023 Comments Improve Suggest changes Like Article Like Report Prerequisite: Selenium Python In this article, we will scrape the CBSE result from their website and store the result in a CSV file. The CSV file will contain the following information. Candidate namePass or fail statusMarks obtainedInstallations required Go to command prompt and put this is in:pip install seleniumOnce that’s done, download a webdriver for automation. Here, we’ll use chromedriver from http://chromedriver.chromium.org/ Approach: First to go 12th website follow this LINK(this is for CBSE board 12th result 2014 pass-out).Then click on investigate element by urgent ctrl + shift + I or stepping into setting of browser and clicking on investigate detail manually.Then navigate to the box where the roll number is filled then copy the x_path.Then navigate the view submit button then copy the x_path.We want to store the result in CSV file then also navigate student name, fail-pass status, marks obtained and then fill up roll number automatically by script go to next page find x_path of student name, fail-pass status, obtain marks. Given some screenshot to follow this instruction step by step: Step 1: Step 2: Step 3: Step 4: Step 5: Step 6: follow same left three subject Below is the implementation: Python3 from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import Select from selenium.common.exceptions import NoSuchElementException import csv import time # creating csv file filename = "cbse.csv" # open csv file to write f = open(filename, 'w') # create header in file header = "NAME,STATUS,NUM\n" f.write(header) # put range of rollnumber for i in range(9639428, 9639432): # use try and exception because if any # rollnumber is invalid then whole # program is not stop. try: driver = webdriver.Chrome() # link is given above copy and paste driver.get( "http://resultsarchives.nic.in/cbseresults/cbseresults2014/class12/cbse122014_total.htm") # put rollnumber driver.find_element_by_xpath( '/html/body/table[3]/tbody/tr/td/font/center[2]/form/div[1]/center/p/input[1]').send_keys(i) # view result xpath driver.find_element_by_xpath( '/html/body/table[3]/tbody/tr/td/font/center[2]/form/div[1]/center/p/input[2]').click() # student name name = driver.find_element_by_xpath( '/html/body/div[2]/table[2]/tbody/tr[2]/td[2]/font/b').text # status pass or fail status = driver.find_element_by_xpath( '/html/body/div[2]/div/center/table/tbody/tr[12]/td[2]/b[1]/font').text # first subject find xpath then next 4 subject m1 = driver.find_element_by_xpath( '/html/body/div[2]/div/center/table/tbody/tr[2]/td[5]/font').text m2 = driver.find_element_by_xpath( '/html/body/div[2]/div/center/table/tbody/tr[3]/td[5]/font').text m3 = driver.find_element_by_xpath( '/html/body/div[2]/div/center/table/tbody/tr[4]/td[5]/font').text m4 = driver.find_element_by_xpath( '/html/body/div[2]/div/center/table/tbody/tr[5]/td[5]/font').text m5 = driver.find_element_by_xpath( '/html/body/div[2]/div/center/table/tbody/tr[6]/td[5]/font').text # sum all marks num = str(int(m1)+int(m2)+int(m3)+int(m4)+int(m5)) # all details fill into file f.write(name+","+status[9:]+","+num+"\n") driver.close() except NoSuchElementException as exception: continue f.close() Output: Comment More infoAdvertise with us Next Article Check CBSE result using Selenium in Python praveeny182 Follow Improve Article Tags : Python Software Testing Selenium python-utility Python-selenium Python Selenium-Exercises +2 More Practice Tags : python Similar Reads Check 12th Class Result Using Selenium in Python We are going to collect the data of 12th class in CSV file with the following information: Candidate namePass or fail statusDivisionObtain marks This task will be done by using selenium library of Python. Requirement: You need to install chrome driver and set path. Click here To download. For more i 3 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 Non blocking wait in selenium using Python Prerequisite : Browser Automation Using SeleniumWhen we want to do web automation, we require to wait for some javascript elements to load before we perform some action. For that matter, generally people use Python3 time.sleep(in_seconds) which is a blocking call.By blocking call I mean, it waits or 3 min read Navigating links using get method - Selenium Python Selenium's Python module allows you to automate web testing using Python. The Selenium Python bindings provide a straightforward API to write functional and acceptance tests with Selenium WebDriver. Through this API, you can easily access all WebDriver features in a user-friendly way. This article e 2 min read get_window_rect 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. To open a webpage using Selenium Python, checkout â Navigating links using get method â Selenium Python. Just bein 2 min read Like