def verify_text(self, text): result = self.get_text(self.text_preview) if result == text: cl.allureLogs("Verified Text") return True else: return False
def test_text_field(self): self.ep.enter_data("Appium Automation") self.ep.click_submit_button() time.sleep(10) result = self.ep.verify_text("Appium Automation") assert True == result cl.allureLogs("Test Case Passed")
def enter_email(self, data): self.send_text(data, self.email_field_locator) cl.allureLogs("Entered the email")
def click_login_button(self): self.click_element(self.login_button_locator) cl.allureLogs("Clicked on Login button")
def enter_data(self, data): self.send_text(data, self.esm_text_field) cl.allureLogs("Entered text")
def verify_admin_text(self): cl.allureLogs("Verified the admin text") return self.is_element_displayed(self.admin_text_locator)
def enter_admin_text(self, data): self.send_text(data, self.admin_field_locator) cl.allureLogs("Entered text in admin field")
def login_page_verification(self): cl.allureLogs("Verified tha Login page") return self.is_element_displayed(self.page_title_locator, "text")
def enter_mobile(self, mobile_no=""): self.send_text(mobile_no, self.enter_mobile_no_field) cl.allureLogs("Enter the mobile number")
def enter_address(self, address=""): self.send_text(address, self.enter_address_field) cl.allureLogs("Enter the address")
def enter_email(self, email=""): self.send_text(email, self.enter_email_field) cl.allureLogs("Enter the email ID")
def enter_name(self, name=""): self.send_text(name, self.enter_name_field) cl.allureLogs("Enter the name")
def verify_page_title(self): self.is_element_displayed(self.esm_title, "text") cl.allureLogs("Verified Page Title")
def enter_password(self, data): self.send_text(data, self.password_field_locator) cl.allureLogs("Entered the password")
def click_contact_us_form_button(self): self.click_element(self.contact_us_button) cl.allureLogs("Click on Contact Us Form Button")
def click_sign_in_button(self): self.click_element(self.login_button) cl.allureLogs("Clicked on sign-in button to login")
def page_title(self): cl.allureLogs("Verify the page") return self.is_element_displayed(self.page_name, "text")
def app_page_verification(self): cl.allureLogs("Verified the app page") return self.is_element_displayed(self.app_page_locator, "text")
def test_login_button(self): self.cp.click_login_button() result = self.cp.login_page_verification() assert True == result cl.allureLogs("Login Button Verification")
def click_submit_button(self): self.click_element(self.submit_button_locator) cl.allureLogs("Clicked on submit button")
def test_esm_button(self): cl.allureLogs("App Launched") self.ep.click_esm_button() self.ep.verify_page_title()
def verify_error_message(self): cl.allureLogs("Verified error message") return self.is_element_displayed(self.error_message_locator, "text")
def click_esm_button(self): self.click_element(self.esm_button) cl.allureLogs("Clicked on esm button")