def display_results_page(self, exam_id): """ Displays results table of the exam. """ users = self.client.server.get_users_by_exam(exam_id) questions_ids = self.client.server.get_questions_ids(exam_id) results_table = self.client.server.get_results_table(exam_id) self.display_widget( ResultsPage(self, exam_id, users, questions_ids, results_table))
class MainWindow(Tk): def __init__(self): Tk.__init__(self) self.config(bg="#222831") self.wm_geometry("800x500") self.container_buttons = Frame(self, bg="#00adb5") self.container_buttons.pack(side="top", fill="x", expand=False) self.container_pages = Frame(self, bg="#393e46") self.container_pages.pack(side="bottom", fill="both", expand=True) # Place is used because I needed to place both pages exactly in top of each other # by specifying there exact pixel locations on the container_pages frame self.results_page = ResultsPage(self.container_pages) self.results_page.place(in_=self.container_pages, x=0, y=0, relwidth=1, relheight=1) self.test_page = TestPage(self.container_pages) self.test_page.place(in_=self.container_pages, x=0, y=0, relwidth=1, relheight=1) # buttons placed in the buttons frame self.button_test_page = Button(self.container_buttons, bg=button_color_on, width=20, height=2, text="Test Page", font=("Colfax", 8, "bold"), command=button1_click) self.button_test_page.pack(side="left") self.button_results_page = Button(self.container_buttons, bg=button_color_off, width=20, height=2, text="Past results Page", font=("Colfax", 8, "bold"), command=button2_click) self.button_results_page.pack(side="left")
def __init__(self, project): super(ExamWizard, self).__init__() self.project = project self.order = None # TODO: Implement order loading here? self.results = None # TODO: Implement result loading here? # self.currentIdChanged.connect(self.updateCurrentIdInProject) self.setOption(QWizard.IndependentPages, False) self.addPage(MasterPage(project, self)) self.addPage(GeneratePage(project, self)) self.addPage(ScanPage(project, self)) # self.addPage(ScoresPage(project, self)) self.addPage(ResultsPage(project, self))
def search_for(self, search_term): element = self._driver.find_element_by_name("q") element.send_keys(search_term) element.submit() return ResultsPage(self._driver)
def search_for(self, text): super().get_element(self.search_field).send_keys(text) super().get_element(self.search_field).submit() return ResultsPage(self.driver)