Guest User

Untitled

a guest
Aug 14th, 2019
63
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import allure
  2. from selene.api import *
  3. from pages.flush_messages import *
  4.  
  5.  
  6. class QuizPage:
  7.     # Page locators
  8.     def __init__(self):
  9.         self.quiz_btn = s(".LectureQuizzes__plus-icon-wrapper")
  10.         self.question_field = s(".CreateQuiz__form-control [type]")
  11.         self.answer_field = ss(".form-control.form-control--medium.without-indents.ant-input-affix-wrapper")
  12.  
  13.     # Allure steps
  14.     @allure.step("User click create new quiz")
  15.     def click_create_create_quiz_button(self):
  16.         self.quiz_btn.scroll_to()
  17.         self.quiz_btn.click()
  18.  
  19.     @allure.step("User fill question")
  20.     def fill_question_field(self, question):
  21.         self.question_field.set_value(question)
  22.  
  23.     @allure.step("User fill two answers fields")
  24.     def fill_answers_fields(self, answer):
  25.         self.answer_field.
  26.  
  27.     # Methods action
  28.     def create_action(self, question, answer):
  29.         self.click_create_create_quiz_button()
  30.         self.fill_question_field(question)
  31.         self.fill_answers_fields(answer)
  32.  
  33.     def edit_action(self):
  34.         pass
  35.  
  36.     def delete_action(self):
  37.         pass
RAW Paste Data