def verify(self, bundleid, preexpirycommand, Appbuttons, window, resettimeanddate): commonFns.quitApplication(bundleid) print "product quit" commonFns.executeCommand(preexpirycommand) print "PreExpiry" ldtp.wait(80) commonFns.launchApplication(bundleid) print "Launching" ldtp.wait(10) commonFns.atomacclick(Appbuttons[6]) ldtp.wait(10) device_status = commonFns.devicesSatusVerification(window) print "Device status" ldtp.wait(1) return device_status commonFns.executeCommand(timeanddatereset)
def verify(self, Appbuttons, window, refrenceid, image, email): commonFns.atomacclick(Appbuttons[8]) commonFns.sendsms(window, refrenceid, image, email)
if __name__ == "__main__": testcaseobj = TestCase() testcaseobj.reporting() testcaseobj.launch(constants.Data["bundleid"]) reference = testcaseobj.appRef(constants.Data["bundleid"]) window = testcaseobj.appwindow(reference) buttons = testcaseobj.appButtons(window) testcaseobj.verify(buttons, window, reference, constants.Data["icon"], constants.Data["email"]) filename = testcaseDescription + "pass" + strftime("%Y-%m-%d %H:%M:%S", gmtime()) commonFns.screenshot(filename) childwindows = commonFns.getApplicationwindowId(reference) protectdevicewindowbuttons = commonFns.getAppButtons(childwindows) commonFns.atomacclick(protectdevicewindowbuttons[0]) filename = testcaseDescription + "pass" + strftime("%Y-%m-%d %H:%M:%S", gmtime()) commonFns.screenshot(filename) newbuttons = commonFns.getAppButtons(childwindows) ldtp.wait(8) if commonFns.atomacclick(newbuttons[0]): filename = testcaseDescription + "pass" + strftime( "%Y-%m-%d %H:%M:%S", gmtime()) commonFns.Resultsupdate(constants.Data["testresult"], filename) commonFns.screenshot(filename) else: fileupdate = testcaseDescription + "fail" + strftime( "%Y-%m-%d %H:%M:%S", gmtime()) commonFns.Resultsupdate(constants.Data["testresult"], fileupdate) testcaseobj.quit(constants.Data["bundleid"])
except Exception as er: return False return AppButtons def verify(self,Appbuttons): commonFns.verifynotification(Appbuttons) def quit(self,Appbundleid ): commonFns.quitApplication(Appbundleid) def reporting(self): print "Executing %s" % testcaseName, ":" + testcaseDescription if __name__ == "__main__": testcaseobj = TestCase() testcaseobj.reporting() testcaseobj.launch(constants.Data["bundleid"]) ref = testcaseobj.appRef(constants.Data["bundleid"]) window = testcaseobj.appwindow(ref) buttons = testcaseobj.appButtons(window) testcaseobj.verify(buttons[4]) filename = testcaseDescription + "pass" + strftime("%Y-%m-%d %H:%M:%S", gmtime()) commonFns.screenshot(filename) if commonFns.atomacclick(buttons[4]): commonFns.Resultsupdate(constants.Data["testresult"], filename) else: filename = testcaseDescription + "fail" + strftime("%Y-%m-%d %H:%M:%S", gmtime()) commonFns.Resultsupdate(constants.Data["testresult"], filename) testcaseobj.quit(constants.Data["bundleid"])
def verify(self, Appbuttons, window): commonFns.atomacclick(Appbuttons[6]) commonFns.devicesSatusVerification(window)
commonFns.atomacclick(Appbuttons[6]) commonFns.devicesSatusVerification(window) def reporting(self): print "Executing %s" % testcaseName, ":" + testcaseDescription def quit(self, Appbundleid): commonFns.quitApplication(Appbundleid) if __name__ == "__main__": testcaseobj = TestCase() testcaseobj.reporting() testcaseobj.launch(constants.Data["bundleid"]) ref = testcaseobj.appRef(constants.Data["bundleid"]) window = testcaseobj.appwindow(ref) buttons = testcaseobj.appButtons(window) testcaseobj.verify(buttons, window) status_parsing = device_status.encode('utf-8') values = str(status_parsing) if "Expired" in values.split: print "Subscription Expired" #writing to results file else: print "Not able find the status" print device_status commonFns.atomacclick(buttons[0]) filename = testcaseDescription + "pass" + strftime("%Y-%m-%d %H:%M:%S", gmtime()) commonFns.Resultsupdate(constants.Data['testresult'], filename) testcaseobj.quit(constants.Data["bundleid"])
MacSecurityTabObjects = [] AccountTabObjects = [] _filepath = commonFns.checkFileExits(constants.Data.get('xmlfilepath')) _buildinstalled_in_system = commonFns.xmlparsing( _filepath, constants.Data.get('buildnumber')) print("Build number installed: %s" % _buildinstalled_in_system) commonFns.launchApplication(constants.Data["bundleid"]) _refrenceid = commonFns.getApplicationReferenceID( constants.Data["bundleid"]) print "_ref", _refrenceid _windowname = commonFns.getApplicationwindowId(_refrenceid) _title = commonFns.getApplicatontitle(_windowname) print("Installed: %s" % _title) #2secnd test case HomeTabobjects = commonFns.getAppButtons(_windowname) commonFns.atomacclick(HomeTabobjects[6]) print "Verifying Device Status " ldtp.wait(3) DeviceStatus_Descriptions = commonFns.devicesSatusVerification( _windowname) for info in DeviceStatus_Descriptions: print info print "Verifying protectMoreDevices" commonFns.protectMoreDevices(HomeTabobjects[7]) print "Verifying pcorMacVerification" commonFns.pcorMacVerification(_windowname, _refrenceid, constants.Data["icon"], constants.Data["email"]) childwindows = commonFns.getApplicationwindowId(_refrenceid) protectdevicewindowbuttons = commonFns.getAppButtons(childwindows) commonFns.atomacclick(protectdevicewindowbuttons[0])
def verify(self, Appbuttons, window): commonFns.atomacclick(Appbuttons[6]) device_status = commonFns.devicesSatusVerification(window) ldtp.wait(1) return device_status
def reporting(self): print "Executing %s" % testcaseName, ":" + testcaseDescription def quit(self, Appbundleid): commonFns.quitApplication(Appbundleid) if __name__ == "__main__": testcaseobj = TestCase() testcaseobj.reporting() testcaseobj.launch(constants.Data["bundleid"]) ref = testcaseobj.appRef(constants.Data["bundleid"]) window = testcaseobj.appwindow(ref) buttons = testcaseobj.appButtons(window) commonFns.atomacclick(buttons[0]) testcaseobj.verify(window, ref) deep_device = commonFns.deepDevice(window, ref) ldtp.wait(5) filename = testcaseDescription + "pass" + strftime("%Y-%m-%d %H:%M:%S", gmtime()) commonFns.screenshot(filename) deep_device_all_objects = commonFns.getAllObjects(deep_device) deep_deivce_buttons = commonFns.getAppButtons(deep_device) commonFns.atomacclick(deep_deivce_buttons[2]) ldtp.wait(5) commonFns.screenshot(filename) if commonFns.atomacclick(deep_deivce_buttons[3]): commonFns.screenshot(filename) commonFns.Resultsupdate(constants.Data['testresult'], filename) ldtp.wait(5)
def verify(self, Appbuttons, window): #Disable RTS from command promt and enable from Action Center commonFns.atomacclick(Appbuttons[6]) commonFns.devicesSatusVerification(window)
def verify(self,Appbuttons,window): #Disable Firewall From Action Center then enable from firewall commonFns.atomacclick(Appbuttons[6]) commonFns.devicesSatusVerification(window)