def verifyMessage(self, message): expected_format = 'Hello {} How are you today'.format(message) assertion.assertEquals('The message is not equal:', expected_format, page.getMessageText().getText()) return self
def selectAlertWithOkOption(self): page.getOptionAlertOk().click() return self
def verifyButtonAlertTextbox(self): assertion.assertTrue( 'Unable to find the button to display an alert with Textbox', page.getButtonAlertTextbox().isDisplayed()) return self
def openDialogTextbox(self): self.verifyButtonAlertTextbox() page.getButtonAlertTextbox().click() return self
def openDialogOKCancel(self): self.verifyButtonAlertOKCancel() page.getButtonAlertOKCancel().click() return self
def verifyButtonAlertOKCancel(self): assertion.assertTrue( 'Unable to find the button to display an alert box with OK and Cancel options', page.getButtonAlertOKCancel().isDisplayed()) return self
def verifyOkAndCancelOption(self): assertion.assertTrue('Unable to find the OK and Cancel option', page.getButtonAlertOKCancel().isDisplayed()) return self
def selectAlertWithTextboxOption(self): page.getOptionAlertTextbox().click() return self
def selectAlertWithOkAndCancelOption(self): page.getOptionAlertOkCancel().click() return self