def Setup(): driver=BrowserFunctions.BrowserLoad() pm= PMPage() pm.Redirect(driver) yield driver driver.close()
def __init__(self): PMPage.__init__(self) self.url = '/PM/Compose' self.tofield = '//textarea[@id="1"]' self.subjectfield = '//textarea[@id="2"]' self.messagefield = '//textarea[@id="3"]' self.submitbutton = '//input[@type="submit"]'
def test_PMElementsDispalyed(self,Setup): pm=PMPage() try: pm.GetComposeMessaging(Setup) pm.GetSent(Setup) pm.GetInbox(Setup) except: assert False assert True
def ComposeMessage(self, Setup): pm = PMPage(Setup).click() cmpm = PMComposeMessagePage() cmpm.GetComposeMessaging(Setup).click() try: cmpm.GetToField(Setup).send_keys('hello') cmpm.GetSubjectField(Setup).send_keys('hkhfkfhsd') cmpm.GetMessageField(Setup).send_keys('hsjkhgkhkfhkfgkghjk') cmpm.GetSubmitButton(Setup).click() except: assert False assert True
def __init__(self): PMPage.__init__(self) self.url = '/Sent'
def __init__(self): PMPage.__init__(self) self.markreadbutton = '//button[@name="markRead"]' self.markunreadbutton = '//button[@name="markunRead"]' self.blocklistbutton = '//button[@name="blockList"]'
def test_Refresh(self,Setup): pm=PMPage() Setup.refresh() assert pm.IsOn(Setup) #add assert checking content is still on page