Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App

Related Articles

Check High School Result using Selenium in Python

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

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 of students is 400 to 1000 then check the status by manual is very hard and time taking process then we are doing smart work check for the result. Using selenium check result and store in a CSV file.

We are going to check the status of the results in high school by using selenium. This might be very helpful for school authorities by helping them in organizing data on the basis of the pass and fail status. They can get the number of passes and fail students followed by their names. Manual checking of status is preferable only when the number of students is less, like around 10 or 20. But for numerous students, it is not recommendable and convenient to perform manual checking as it takes more time and work.

Here, We came up with a solution by automating this process using selenium. We can perform smart checking of result status and store the data in CSV file


You need to install chrome driver and set path. Click here To download. For more information follow this link

Below are the steps:

  1. First to go high school website follow this link (this is for up board high school result).
  2. Then click on investigate element by urgent ctrl + shift + i or stepping into setting of browser and clicking on investigate detail manually.
  3. Then navigate to the box where the roll number is filled then copy the x_path.
  4. Then navigate the submit button then copy the x_path.
  5. I want to store the result in CSV file then also navigate student name and status. Then fill up roll number automatically by script go to next page find x_path of name and status.

Follow step-by-step with the help of screenshots and copy the x_path of element and put into the code:

Step 1:

Step 2:

Step 3:

Step 4:

Step 5:

Step 6:

Step 7:

Step 8:

Step 9:

Below is the implementation:


# import required libraries
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from import Select
from selenium.common.exceptions import NoSuchElementException
import csv 
import time
# give name of csv file
filename = "result.csv"
# open file in write mode
f = open(filename, 'w')
# create header
header = "name,status\n"
# write into the file
# put rollnumber without zero like
# your number 0477593 then
# put 477593 upto XXXXX.
start_roll_no = 477593
end_roll_no = 477599
for i in range(start_roll_no, end_roll_no + 1):
    # exception handling
        # create instance of Chrome webdriver
        driver = webdriver.Chrome()
        # paste the link upboard website
        # roll number start with zero then change into string
        tv= '0'+str(i)
        # find the element where we have to
        # enter the xpath target rollnumber box 
        # and put rollnumber value who store in t. 
        # paste the xpath of submit button 
        # name of student's x_path copy and get text of element
        # result of student's x_path copy and get text of element
        # write in the file
        f.write(name + "," + status + "\n")
        # close the web driver
    # using exception when rollnumber is wrong and
    # not show result on this roll number
    except NoSuchElementException as exception:
# close and save the file


Output csv file

My Personal Notes arrow_drop_up
Last Updated : 04 Jan, 2021
Like Article
Save Article
Similar Reads
Related Tutorials