def test_bug_enter_email_password_and_login_login_00051(self): udid = "*****@*****.**" password = "******" util.patientLogin(self.driver,udid,password) sleep(20) filePath = util.save_screenshot(self.driver,"liveNowTeleVid","Patient","0002") allure.attach.file(filePath,attachment_type=allure.attachment_type.PNG)
def test_bug_click_on_appointment_00051(self): # opt_button = util.Find_Element_Xpath(self.driver,"//ion-button[@class='tool-btn ham-btn md button button-solid ion-activatable ion-focusable hydrated']") # opt_button.click() # click_appoint = util.Find_Element_Xpath(self.driver,"//ion-menu-toggle[2]//ion-item[1]") # click_appoint.click() # self.driver.get("https://dev.patientmd.com:8080/#/telemedicine/live-now") self.driver.get(envObj.test_useEnviroment(self)+'/telemedicine/live-now') sleep(15) filePath = util.save_screenshot(self.driver,"liveNowTeleVid","Patient","0002") allure.attach.file(filePath,attachment_type=allure.attachment_type.PNG)
def test_bug_click_login_00051(self): sleep(8) login = util.Find_Element_Xpath(self.driver,"//button[@class='dropbtn']") util.MouseOver(self.driver, login) sleep(4) pat_login = util.Find_Element_Xpath(self.driver,"//div[@class='as patient']//a[contains(text(),'Login to Continue')]") pat_login.click() sleep(10) filePath = util.save_screenshot(self.driver,"liveNowTeleVid","Patient","0002") allure.attach.file(filePath,attachment_type=allure.attachment_type.PNG)
def test_bug_doc_app_00051(self,globalList,globalListint): # app = util.Find_Element_Xpath(self.fdriver,"(//*[contains(text(),'Anirban majumdar')])[1]") elements = self.driver.find_elements_by_xpath("//div[@class='ng-star-inserted']//div//ion-list[1]") name = self.driver.find_elements_by_xpath("//body//div[@class='main-container-zu']//div//div//ion-list[1]//ion-item[1]//div[1]//div[1]//div[2]//h6[1]") time = self.driver.find_elements_by_xpath("//body//div[@class='main-container-zu']//div//div//ion-list[1]//ion-item[1]//div[1]//div[1]//span[2]") vid = self.driver.find_elements_by_xpath("//div//ion-list[1]//ion-item[1]//div[1]//div[1]//span[1]//ion-icon[1]") print(len(elements)) for i in range (len(elements)): if "videocam" in vid[i].get_attribute("aria-label") and "Christ Pavlatos" in name[i].text : globalListint.intList.append(time[i].text) util.ActionClick(self.driver, elements[i]) print(globalListint.intList) sleep(15) filePath = util.save_screenshot(self.driver,"liveNowTeleVid","Patient","0002") allure.attach.file(filePath,attachment_type=allure.attachment_type.PNG)
def test_bug_doc_app_00052(self,globalList,globalListint): elements = self.fdriver.find_elements_by_xpath("//body//div[@class='main-container-zu']//div//div//div//div//ion-list[1]") name = self.fdriver.find_elements_by_xpath("//body//div[@class='main-container-zu']//div//div//ion-list[1]//ion-item[1]//div[1]//div[1]//div[2]//h6[1]") time = self.fdriver.find_elements_by_xpath("//body//div[@class='main-container-zu']//div//div//ion-list[1]//ion-item[1]//div[1]//div[1]//span[2]") vid = self.fdriver.find_elements_by_xpath("//body//div[@class='main-container-zu']//div//div//div//div//ion-list[1]//ion-item[1]//div[1]//div[1]//span[1]//ion-icon[1]") # for i in range (len(elements)): # if "videocam" in vid[i].get_attribute("aria-label") and "Anirban majumdar" in name[i].text : # globalListint.intList.append(time[i].text) # util.ActionClick(self.driver, elements[i]) print(len(elements)) for i in range (len(elements)): if time[i].text == globalListint.intList[0]: print(time[i].text +" : "+ globalListint.intList[0]+" : "+str(i)) util.ActionClick(self.fdriver, elements[i]) # print(globalListint.intList) # # print(globalList.empList) sleep(15) filePath = util.save_screenshot(self.fdriver,"liveNowTeleVid","Patient","0002") allure.attach.file(filePath,attachment_type=allure.attachment_type.PNG)
def test_bug_login_00051(self): loginInto(envObj.test_useEnviroment(self),self.driver,"PATIENT") sleep(10) self.driver.set_window_size(1400, 900) filePath = util.save_screenshot(self.driver,"liveNowTeleVid","Patient","0002") allure.attach.file(filePath,attachment_type=allure.attachment_type.PNG)
def test_bug_check_screen_00052(self): # self.fdriver.switch_to.alert.accept() sleep(15) filePath = util.save_screenshot(self.fdriver,"liveNowTeleVid","Patient","0002") allure.attach.file(filePath,attachment_type=allure.attachment_type.PNG) self.fdriver.close()
def test_bug_check_screen_00051(self): # if alert = self.fdriver.switch_to.alert.is_displayed(): # alert.accept() sleep(15) filePath = util.save_screenshot(self.driver,"liveNowTeleVid","Patient","0002") allure.attach.file(filePath,attachment_type=allure.attachment_type.PNG)
def test_bug_continue_00052(self): continuBtn = util.Find_Element_Xpath(self.fdriver,"//button[@class='fab-cyan']") util.ActionClick(self.fdriver, continuBtn) sleep(15) filePath = util.save_screenshot(self.fdriver,"liveNowTeleVid","Patient","0002") allure.attach.file(filePath,attachment_type=allure.attachment_type.PNG)
def test_bug_goto_live_now_00052(self): # self.fdriver.get("https://dev.patientmd.com:8080/#/m/telemedicine/live-now") self.fdriver.get(envObj.test_useEnviroment(self)+'/m/telemedicine/live-now') sleep(15) filePath = util.save_screenshot(self.fdriver,"liveNowTeleVid","Patient","0002") allure.attach.file(filePath,attachment_type=allure.attachment_type.PNG)
def test_bug_click_on_continue_00051(self): video_tele = util.Find_Element_Xpath(self.driver, "//*[text()='CONTINUE VIDEO TELEMEDICINE']") util.ActionClick(self.driver, video_tele) sleep(15) filePath = util.save_screenshot(self.driver,"liveNowTeleVid","Patient","0002") allure.attach.file(filePath,attachment_type=allure.attachment_type.PNG)
def pytest_exception_interact(node, report): if node and report.failed: class_name = node._nodeid.replace(".py::", "_class_") name = "{0}_{1}".format(class_name, url) utils.save_screenshot(node.funcargs.get("driver"), name)