I am trying to write a python code that opens a particular website and checks for a value particular variable
How can I get the value of this variable to check whether the section is closed or opened it returns false if closed and true if opened
this is my code so far (it is missing some parts I hope to get help on these parts)
FireFoxDriverPath = '/Users/User/Desktop/geckodriver-v0.30.0-win64/geckodriver.exe'
url = "https://www.google.com/"
browser = webdriver.Firefox(executable_path=FireFoxDriverPath)
browser.get(url)
element_dropdown =browser.find_element_by_id('course_term_code')
select = Select(element_dropdown)
element_dropdown2=browser.find_element_by_id('course_dept_code')
select2 = Select(element_dropdown2)
try:
select.select_by_visible_text("Term 221")
select2.select_by_visible_text("Mathematics")
browser.refresh()
except NoSuchElemnentException:
print('The item does not exist')
Note: The drop-downs is to choose semester and course