Skip to content

Commit 80b64c6

Browse files
authored
Merge pull request #99 from OscarDogar/dev
fix: 🚑 Update quiz selector to fix skipping issue
2 parents ed663a1 + 4f8dc4a commit 80b64c6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

main.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
checkCaptchaSelector = "MainLayout"
4444
checkVideoSelector = "VideoPlayer"
4545
checkLectureSelector = "styles_Lecture"
46-
checkQuizSelector = "StartQuizOverview-buttons"
46+
checkQuizSelector = "StartQuizOverview"
4747
contentSelector = "styles_IFrame"
4848
checkExamSelector = "StartExamOverview"
4949

@@ -520,6 +520,9 @@ def work():
520520
if len(quiz) != 0:
521521
jumpNext = driver.find_element(By.CLASS_NAME, skipQuizBtnSelector)
522522
jumpNext.click()
523+
popup = driver.find_elements(By.XPATH, f"//*[contains(@class, 'Button-module_Button--secondary_')]")
524+
if popup:
525+
popup[0].click()
523526
else:
524527
content = driver.find_elements(
525528
By.XPATH, f"//*[contains(@class, '{contentSelector}')]"
@@ -607,11 +610,10 @@ def work():
607610
)
608611
else:
609612
print(e)
610-
finally:
611-
input("Press enter to exit")
612613

613614

614615
if __name__ == "__main__":
615616
# Pyinstaller fix
616617
multiprocessing.freeze_support()
617618
main()
619+
input("Press enter to exit")

0 commit comments

Comments
 (0)