create.class

    0

    10

    hoangNTB

    self.__otp_num_boxes = len(self.__otp_text_boxes)
    self.__otp_holder = Gtk.TextBuffer()
    self.__otp_num_holders = len(self.__otp_text_boxes)
    def on_init(self, data):
    self.__otp_holder.append(data)
    self.__otp_numbers_textbox.append(self.__OTP_NUMBERS_TEXTBOX_TEXT)
    self.__otp_continue_button.set_text(self.__CONTINUE_BUTTON_TEXT)
    self.__otp_confirm_button.set_text(self.__CONFIRM_BUTTON_TEXT)
    self.__otp_password_textbox.set_text(self.__PASSWORD_TEXTBOX_TEXT)
    self.__otp_re_password_textbox.set_text(self.__RE_PASSWORD_TEXTBOX
    

    Shortcut: create.elements

    from src.pg_components.pages.base_page import BasePage
    from playwright.async_api import Page
    
    
    
    class RegisterElements(BasePage):
    
      __PHONE_NUMBERS_TEXTBOX_TEXT = "Nhập số điện thoại"
      __CONTINUE_BUTTON_TEXT = "Tiếp tục"
      __CONFIRM_BUTTON_TEXT = "Xác minh"
      __OTP_NUMBERS_TEXTBOX_TEXT = "Nhập số điện thoại"
      __PASSWORD_TEXTBOX_TEXT = "Nhập mật khẩu"
      __RE_PASSWORD_TEXTBOX_TEXT = "Nhập lại mật khẩu"
      __OTP_TEXT_BOXES_TEXT = "//input"
    
      def __init__(self, page: Page):
        super().__init__(page)
        self.__phone_numbers_textbox = self.page.get_by_placeholder(self.__PHONE_NUMBERS_TEXTBOX_TEXT)
        self.__continue_button = self.page.get_by_role("button", name=self.__CONTINUE_BUTTON_TEXT)
        self.__confirm_button = self.page.get_by_role("button", name=self.__CONFIRM_BUTTON_TEXT)
        self.__password_textbox = self.page.get_by_placeholder(self.__PASSWORD_TEXTBOX_TEXT)
        self.__re_password_textbox = self.page.get_by_placeholder(self.__RE_PASSWORD_TEXTBOX_TEXT)
        self.__otp_text_boxes = self.page.locator(self.__OTP_TEXT_BOXES_TEXT)
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.