Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import allure
- from selene.api import *
- from pages.flush_messages import *
- class QuizPage:
- # Page locators
- def __init__(self):
- self.quiz_btn = s(".LectureQuizzes__plus-icon-wrapper")
- self.question_field = s(".CreateQuiz__form-control [type]")
- self.answer_field = ss(".form-control.form-control--medium.without-indents.ant-input-affix-wrapper")
- # Allure steps
- @allure.step("User click create new quiz")
- def click_create_create_quiz_button(self):
- self.quiz_btn.scroll_to()
- self.quiz_btn.click()
- @allure.step("User fill question")
- def fill_question_field(self, question):
- self.question_field.set_value(question)
- @allure.step("User fill two answers fields")
- def fill_answers_fields(self, answer):
- self.answer_field.
- # Methods action
- def create_action(self, question, answer):
- self.click_create_create_quiz_button()
- self.fill_question_field(question)
- self.fill_answers_fields(answer)
- def edit_action(self):
- pass
- def delete_action(self):
- pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement