def __init__()

in playwright_tests/pages/ask_a_question/posted_question_pages/questions_page.py [0:0]


    def __init__(self, page: Page):
        super().__init__(page)
        # Breadcrumb locators.
        self.question_breadcrumb = lambda question_title: page.locator(
            "ol#breadcrumbs").get_by_role("listitem", name=question_title, exact=True)
        # "Posted successfully" green banner locators.
        self.posted_questions_success_banner_message = page.locator(
            "ul[class='user-messages'] li p")
        self.posted_questions_success_banner_my_questions_link = page.locator(
            "ul[class='user-messages'] li p a")
        self.posted_questions_success_banner_close_button = page.locator(
            "ul[class='user-messages'] li button")
        self.reply_flagged_as_spam_banner = page.locator(
            "li[class='mzp-c-notification-bar mzp-t-warning'] p")
        self.marked_as_spam_banner = page.locator("p[class='is-spam']")
        self.lock_this_thread_banner = page.locator(
            "div[class='notice mzp-c-notification-bar mzp-t-click'] p")
        self.lock_this_thread_banner_link = page.locator(
            "div[class='notice mzp-c-notification-bar mzp-t-click'] p a")
        self.problem_solved_banner_text = page.locator(
            "li[class='mzp-c-notification-bar mzp-t-success'] p")

        # Problem solved locators.
        self.problem_solved_reply_text = page.locator("div[class='reply'] p")
        self.problem_solved_reply_section = page.locator("div[class='solution card elevation-00']")
        self.problem_solved_reply_section_header = page.locator("h4[class='is-solution']")
        self.problem_solved_reply_reply_link = page.locator("div[class='reply'] a")
        self.undo_solves_problem = page.locator("input[value='Undo']")
        self.reply_solves_the_problem = lambda target_reply_id: page.locator(
            f"div#{target_reply_id} + aside input[type='submit']")
        self.reply_solution_header = lambda reply_id: page.locator(
            f"div#{reply_id} h3[class='is-solution']")

        # Question locators.
        self.question_author = page.locator("div[class='question'] span[class='display-name']")
        self.questions_header = page.locator(
            "h2[class='sumo-callout-heading summary no-product-heading']")
        self.question_body = page.locator("div[class='main-content'] div p")
        self.modified_question_section = page.locator("p[class='edited text-body-sm']")
        self.question = lambda question_id: page.locator(f"div#{question_id}")

        # Progress bar locators.
        self.complete_progress_items_label = page.locator(
            "li[class='progress--item is-complete'] span[class='progress--label']")

        # Breadcrumbs locators.
        self.aaq_page_breadcrumbs = page.locator("ol#breadcrumbs li a")

        # Question details locators.
        self.question_details_button = page.locator("button[aria-controls='question-details']")
        self.more_system_details_modal = page.locator("div[class='mzp-c-modal']")
        self.more_system_details_option = page.locator("a#show-more-details")
        self.close_additional_system_details_button = page.locator(
            "div[class='mzp-c-modal-close'] button")
        self.user_agent_information = page.locator("div[class='about-support'] li")
        self.more_information_with_text = lambda text: page.locator(
            "div[class='about-support'] p").get_by_text(text, exact=True)
        self.question_section = page.locator("article div[class='question']")

        # Searchbar locators.
        self.search_support_searchbar = page.locator("form#support-search-sidebar input")
        self.search_support_search_button = page.locator("form#support-search-sidebar button")

        # Question Tools locators.
        self.edit_this_question_option = page.locator("ul#related-content li[class='edit'] a")
        self.stop_email_updates_option = page.locator("ul#related-content li[class='email'] a")
        self.subscribe_to_feed_option = page.locator("ul#related-content li[class='rss'] a")
        self.delete_this_question_option = page.locator("ul#related-content a[class='delete']")
        self.lock_this_question_option = page.locator("a[data-form='lock-form']")
        self.archive_this_question_option = page.locator("a[data-form='archive-form']")
        self.system_details_options = page.locator("div#system-details ul[class='system'] li")
        self.mark_as_spam_option = page.locator("ul#related-content form[class='spam-form cf'] a")

        # Tags section locators.
        self.question_tags_options_for_non_moderators = page.locator("li[class='tag'] a")
        self.question_tags_options_for_moderators = page.locator("div[class='ts-control'] div")
        self.add_a_tag_input_field = page.locator("input[id*='tag-select']")
        self.tag_by_name = lambda tag_name:page.locator("li[class='tag']").get_by_role(
            "link", name=tag_name, exact=True)
        self.remove_tag_button = lambda tag_name: page.locator(
            f"//div[@class='ts-control']/div[normalize-space(text())='{tag_name}']/a"
            f"[@class='remove']")
        self.tag = lambda tag_name: page.locator(
            f"//div[@class='ts-control']/div[@class='item' and normalize-space("
            f"text())='{tag_name}']")
        self.delete_tag = lambda tag_name: page.locator(
            f"//div[@class='item' and normalize-space(text())='{tag_name}']/a[@class='remove']")

        # Post a reply section locators.
        self.post_a_reply_section_heading = page.locator("h3[class='sumo-card-heading']")
        self.post_a_reply_textarea = page.locator("textarea#id_content")
        self.post_a_reply_textarea_bold_button = page.locator("button[title='Bold']")
        self.post_a_reply_textarea_italic_button = page.locator("button[title='Italic']")
        self.post_a_reply_textarea_link_button = page.locator("button[title='Insert a link...']")
        self.post_a_reply_textarea_numbered_list_button = page.locator(
            "button[title='Numbered List']")
        self.post_a_reply_textarea_bulleted_list_button = page.locator(
            "button[title='Bulleted List']")
        self.last_reply_by = page.locator("span[class='forum--meta-val visits no-border']")
        self.reply_author = lambda reply_id: page.locator(f"div#{reply_id} a[class='author-name']")
        self.reply_context = lambda reply_id: page.locator(f"div#{reply_id} div[class='content']")
        self.reply_author_display_name = lambda reply_id: page.locator(
            f"div#{reply_id} a[class='author-name'] span[class='display-name']")
        self.reply_user_title = lambda reply_id: page.locator(
            f"div#{reply_id} a[class='author-name'] span[class='user-title']")
        self.reply_section = lambda answer_id: page.locator(f"div#{answer_id}")
        self.more_options_for_answer = lambda answer_id: page.locator(
            f"div#{answer_id}").get_by_role("button", name="more options", exact=True)
        self.quote_reply = lambda answer_id: page.locator(f"div#{answer_id}").get_by_role(
            "link", name="Quote", exact=True)
        self.mark_reply_as_spam = lambda answer_id: page.locator(
            f"//div[@id='{answer_id}']//form[@class='spam-form cf']/a")
        self.marked_as_spam = lambda answer_id: page.locator(
            f"//div[@id='{answer_id}']//h3[@class='is-spam']")
        self.edit_this_post_for_answer = lambda answer_id: page.locator(
            f"div#{answer_id}").get_by_role("link", name="Edit this post", exact=True)
        self.delete_this_post_for_answer = lambda answer_id: page.locator(
            f"div#{answer_id}").get_by_role("link", name="Delete this post", exact=True)
        self.posted_reply_text = lambda reply_id: page.locator(
            f"//div[@id='{reply_id}']//div[@class='content']/p")
        self.username_of_posted_quote_owner = lambda reply_id: page.locator(
            f"div#{reply_id} div[class='content'] em p")
        self.posted_reply_said_link = lambda reply_id: page.locator(
            f"div#{reply_id} div[class='content'] a")
        self.blockquote_reply = lambda reply_id: page.locator(
            f"div#{reply_id} div[class='content'] blockquote")
        self.modified_by_text = lambda reply_id: page.locator(
            f"div#{reply_id} p[class='edited text-body-sm'] em")
        self.repliant_username = lambda repliant_username: page.locator(
            f"(//div[contains(@id,'answer')]//span[@class='display-name' and contains("
            f"text(), '{repliant_username}')])[last()]")
        self.answer_by_username = lambda repliant_username: page.locator(
            f"(//span[@class='display-name' and contains(text(), '{repliant_username}')]"
            f"/ancestor::div[@class='answer '])[last()]"
        )
        self.reply = lambda reply_id: page.locator(f"div#{reply_id}")
        self.reply_by_content = lambda reply_content: page.locator(
            "div[class='content'] p").get_by_text(reply_content, exact=True)
        self.reply_vote_section = lambda reply_id: page.locator(
            f"div#{reply_id} form[class='document-vote--form helpful']")
        self.reply_vote_heading = lambda reply_id: page.locator(
            f"div#{reply_id} h4[class='document-vote--heading']")
        self.reply_vote_thumbs_up = lambda reply_id: page.locator(
            f"div#{reply_id} button[name='helpful']")
        self.reply_vote_thumbs_up_message = lambda reply_id: page.locator(
            f"div#{reply_id} p[class='msg document-vote--heading']")
        self.reply_vote_thumbs_down = lambda reply_id: page.locator(
            f"div#{reply_id} button[name='not-helpful']")
        self.helpful_count = lambda reply_id: page.locator(
            f"div#{reply_id} button[name='helpful'] strong[class='helpful-count']")
        self.unhelpful_count = lambda reply_id: page.locator(
            f"div#{reply_id} button[name='not-helpful'] strong[class='helpful-count']")
        self.response_time = lambda reply_id: page.locator(f"div#{reply_id} time time")

        # Common Responses locators.
        self.common_responses_option = page.locator("a[title='Common responses']")
        self.common_responses_search_field = page.locator("input#filter-responses-field")
        self.common_responses_modal_close_button = page.locator("div#media-modal a")
        self.common_responses_categories_options = page.locator("div#responses-area li")
        self.common_responses_responses_options = page.locator(
            "//ul[@class='sidebar-nav']/li[@class='response' and not(@style='display: none;')]")
        self.common_responses_no_cat_selected = page.locator("h4[class='nocat-label']")
        self.common_responses_switch_to_mode = page.locator("div#response-content-area button")
        self.common_responses_response_preview = page.locator(
            "p[class='response-preview-rendered'] div[class='main-content'] div[class='content']")
        self.common_responses_textarea_field = page.locator("textarea#response-content")
        self.common_responses_insert_response_button = page.locator("button#insert-response")
        self.common_responses_cancel_button = page.locator("div#response-submit-area a")
        self.category_option = lambda option: page.locator(
            "ul[class='category-list'] li").get_by_text(option, exact=True)
        self.response_option = lambda option: page.locator(
            "ul[class='sidebar-nav'] li").get_by_text(option, exact=True)

        # I have this problem too locators.
        self.i_have_this_problem_too_button = page.locator("div[class='me-too'] button")
        self.i_have_this_problem_too_counter = page.locator(
            "span[class='forum--meta-val have-problem']")

        # Needs more information from the user locators.
        self.needs_more_information_from_the_user_checkbox = page.locator("input#id_needs_info")
        self.more_information_panel_header = page.locator(
            "section#more-system-details").get_by_role("heading").filter(
            has_text="More Information")

        # Attached image locators.
        self.attached_image = page.locator("a[class='image'] img")
        self.add_image_button = page.locator("div[class='field add-attachment']")

        # Preview Reply button locators.
        self.preview_reply_button = page.locator("input#preview")

        # Post Reply button locators.
        self.post_reply_button = page.get_by_role("button", name="Post Reply", exact=True)

        # Delete question locators.
        self.delete_question_delete_button = page.locator("input[value='Delete']")
        self.delete_question_cancel_button = page.get_by_role("link").filter(has_text="Cancel")

        # Report abuse section.
        self.report_abuse_submit_button = page.locator(
            "div[class='mzp-c-modal-inner'] button[type='submit']")
        self.report_abuse_textarea = page.locator("div[class='mzp-c-modal-inner'] textarea")
        self.report_abuse_flagged_this_content_message = page.locator(
            "div[class='mzp-c-modal-inner'] span[class='message']")
        self.report_abuse_modal_close_button = page.locator(
            "div[class='mzp-c-modal-inner'] button[class='mzp-c-modal-button-close']")
        self.report_answer_as_abuse = lambda answer_id: page.locator(
            f"div#{answer_id}").get_by_role("link", name="Report Abuse", exact=True)

        # Signed out card locators.
        self.log_in_to_your_account_signed_out_card_option = page.locator(
            "div[class='question-tools ask-a-question card is-shaded'] p").get_by_role(
            "link", name="log in to your account", exact=True)
        self.start_a_new_question_signed_out_card_option = page.locator(
            "div[class='question-tools ask-a-question card is-shaded'] p").get_by_role(
            "link", name="start a new question", exact=True)
        self.ask_a_question_signed_out_card_option = page.locator(
            "div[class='question-tools ask-a-question card is-shaded']").get_by_role(
            "link", name="Ask a question", exact=True)
        self.i_have_this_problem_too_signed_out_card_option = page.locator(
            "div[class='question-tools ask-a-question card is-shaded']").get_by_role(
            "button", name="I have this problem, too", exact=True)