I'm having a problem location the drop down button, it doesn't have an Id or a unique class it also doesn't have text on the drop down bar I'm not sure how to locate it. Any suggestion? This is my code;
## Opens up BrightSpace and selects new notification
from selenium import webdriver
from selenium.webdriver.support.ui import Select
import email_infor
import time
username = email_infor.Data_username
password = email_infor.Data_password
url = 'https://login.microsoftonline.com/ec1bd924-0a6a-4aa9-aa89-c980316c0449/saml2?SAMLRequest=jZE9b4MwEED3Sv0PyDvYBkzAgkhRu0RKl6Tt0KUycCFIxiY%2bU%2fXn12mUKmO3%2b9Cd3rurN4s%2fmT2cF0AfbZ8bgmrS7pp%2frgpx7PJSsbxI81XPKqGKVZUzdlSFKHlGondwOFrTkDRhJNoiLrA16JXxocR4FXMec%2fHKMskzmVZJzkWZZ%2bKDRBtEcD7MPlmDywTuAO5r7OBtv2vIyfsZJaWtG4eTx1l1kCg9WHNeRtNZrWGApLMT7VNN9UxVsKDaDqOhF%2f7dJUpCj0TfkzbYkMUZaRWOKI2aAKXv5GHzspMBW87OehuWkvXjQxTVvxLuP4PqpkDWN%2bBepEr0HGLVVnkcbKu4beEYBwHGqqzgRd8lHkw4ECb3dheZP%2fSaXiECUE3vP7T%2bAQ%3d%3d'
driver = webdriver.Chrome()
driver.get(url)
time.sleep(3)
driver.find_element_by_id('i0116').send_keys(username)
driver.find_element_by_id('idSIButton9').click()
time.sleep(3)
driver.find_element_by_id('passwordInput').send_keys(password)
driver.find_element_by_id('submitButton').click()
time.sleep(.5)
driver.find_element_by_id('idBtn_Back').click()
time.sleep(10)
drop = driver.find_element_by_class_name('d2l-htmlblock d2l-htmlblock-deferred d2l-htmlblock-untrusted')
print(drop)
HTML:
<div class="d2l-htmlblock d2l-htmlblock-deferred d2l-htmlblock-untrusted">
<p>The clock has started on Lab 7!</p>
<p><br>Don't wait to have me sign off on your proposal to start your research into your project idea.</p>
<p><br>The more wholly thought out the idea, the better when submitting your proposal.<br>The folks who have submitted, we will go over your proposal this week in lab class.<br>Everyone else, you are using up lab time that could be used to work on the project itself.<br>Please get the proposals into Brightspace as soon as possible.<br>I have pushed back the deadline for the 2nd time.</p>
<p><br>The lab is out of 100 marks. <br>Up to 20 marks will be given based on your level of communication with me. <br>The technical evaluation part of the lab is worth up to 80 marks.</p>
<p><br>You must document all your research, all code you write, block diagrams, circuit diagrams (pneumatic or electrical), packet traces, etc.
Use notepad or some other text editor to take notes for all work on your project.
Record each activity along with the time and date.
Listed are the three levels of technical evaluation and the associated
mark range :
Level 1 up to 35, Level 2 - up to 25, Level 3 up to 20.
For each project, we will negotiate milestones and deliverables that have
to be met to achieve each level in the technical evaluation.
You need to
reach all negotiated milestones for each level before you can obtain marks
toward the next level.