Exemple #1
0
        commonFns.quitApplication(Appbundleid)


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())
Exemple #2
0
 def appwindow(self, reference):
     try:
         window = commonFns.getApplicationwindowId(reference)
     except Exception as er:
         return False
     return window
    if _installflag == 0:
        print "Now i am installing new build from QA server"

    else:
        HomeTabobjects = []
        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,