Example #1
0
def get_sidebar_text() -> str:
    return web_driver.find_element(SIDEBAR_TEXT).text.replace('"', '')
Example #2
0
def get_answer_tooltip() -> str:
    return web_driver.find_element(TOOLTIP_EMPTY_ANSWER).get_attribute(
        "validationMessage")
Example #3
0
def get_question_tooltip() -> str:
    return web_driver.find_element(TOOLTIP_EMPTY_QUESTION).get_attribute(
        "validationMessage")
Example #4
0
def get_tooltip_text_for_create_question() -> str:
    web_driver.move_to_element(CREATE_QUESTION_SECTION_TITLE)
    web_driver.wait_for_visible(web_driver.find_element(TOOLTIP_NEW_QUESTION))
    return web_driver.find_element(TOOLTIP_NEW_QUESTION).text
Example #5
0
def get_header_of_questions_list():
    return web_driver.find_element(QUESTION_LIST_HEADER).text
Example #6
0
def get_no_answers_warning() -> str:
    return web_driver.find_element(WARNING).text
Example #7
0
def get_header_create_question():
    return web_driver.find_element(CREATE_QUESTION_HEADER).text
Example #8
0
def click_sort_questions_btn():
    web_driver.find_element(SORT_BTN).click()
Example #9
0
def click_remove_questions_btn():
    web_driver.find_element(REMOVE_BTN).click()
Example #10
0
def get_header_text() -> str:
    return web_driver.find_element(HEADER_TEXT).text
Example #11
0
def click_on_first_question():
    web_driver.find_element(QUESTION).click()
Example #12
0
def _click_create_question_btn():
    web_driver.move_to_element(CREATE_QUESTION_BTN)
    web_driver.wait_for_clickable(CREATE_QUESTION_BTN)
    web_driver.find_element(CREATE_QUESTION_BTN).click()
Example #13
0
def _type_answer(answer_text: str):
    web_driver.find_element(ANSWER_INPUT).click()
    web_driver.find_element(ANSWER_INPUT).clear()
    web_driver.find_element(ANSWER_INPUT).send_keys(answer_text)
Example #14
0
def _type_question(question_text: str):
    web_driver.find_element(QUESTION_INPUT).click()
    web_driver.find_element(QUESTION_INPUT).clear()
    web_driver.find_element(QUESTION_INPUT).send_keys(question_text)