当前位置: 首页>>代码示例>>Python>>正文


Python Helpers.getTimeId方法代码示例

本文整理汇总了Python中helpers.Helpers.Helpers.getTimeId方法的典型用法代码示例。如果您正苦于以下问题:Python Helpers.getTimeId方法的具体用法?Python Helpers.getTimeId怎么用?Python Helpers.getTimeId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在helpers.Helpers.Helpers的用法示例。


在下文中一共展示了Helpers.getTimeId方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: testNoAccessRole

# 需要导入模块: from helpers.Helpers import Helpers [as 别名]
# 或者: from helpers.Helpers.Helpers import getTimeId [as 别名]
    def testNoAccessRole(self):
        self.testname="TestNoAccessRole"
        self.setup()
        util = WebdriverUtilities()
        util.setDriver(self.driver)
        element = Elements()
        do = Helpers(self)
        do.setUtils(util)
        do.login()

        email = config.reader1
        reader = config.reader2
        password = config.same_password
        title = "Auto_Private_" + do.getTimeId() + str(do.getRandomNumber())

        do.createObject("Program", title, "checked")
        do.verifyObjectIsCreatedinLHN("Program", title)
        do.assertEqual(1, do.countOfAnyObjectLHS("Program"), "Expect count to be 1 but don't see it.")

        # now log out and then log in with the new account and try to create a program
        do.selectMenuInTopRight("Logout")
          
        # Refresh the page
        do.refresh()
          
        # Log in with new user
        do.login(reader, password)
        print "Log in as : " + do.whoAmI()
        do.uncheckMyWorkBox()
        
        try:
            do.verifyObjectIsCreatedinLHN("Program", title)
        except:
            do.assertEqual(0, do.countOfAnyObjectLHS("Program"), "Expect count to be 0 but don't see it.")
            print "Good...private program should not be visible to reader role unless permitted."
开发者ID:amrishs,项目名称:ggrc-test,代码行数:37,代码来源:TestNoAccessRole.py

示例2: testArtyCreate

# 需要导入模块: from helpers.Helpers import Helpers [as 别名]
# 或者: from helpers.Helpers.Helpers import getTimeId [as 别名]
    def testArtyCreate(self):

        self.testname="TestArtyCreate"
        self.setup()
        util = WebdriverUtilities()
        util.setDriver(self.driver)
        element = Elements()
        do = Helpers(self)
        do.setUtils(util)
        do.login()
        
        program_object = GRCObject 
        program_object.program_elements['title']="Program for Load Test" + do.getTimeId()
        program_object.program_elements['description']="This program is created by ARTY as part of the Load Performance Test"
               
        standard_object = GRCObject 
        standard_object.standard_elements['title']="Standard" + do.getTimeId() # Standard for Load Test
        standard_object.standard_elements['description']="This standard is created by ARTY as part of the Load Performance Test"       
         
        section_object = GRCObject 
        section_object.section_elements['title']="Section" + do.getTimeId() # Section for Load Test
        section_object.section_elements['description']="This section is created by ARTY as part of the Load Performance Test"  
        
        objective_object = GRCObject 
        objective_object.objective_elements['title']="Objective" + do.getTimeId() # Objective for Load Test
        objective_object.objective_elements['description']="This objective is created by ARTY as part of the Load Performance Test"  
        
        control_object = GRCObject 
        control_object.control_elements['title']="Control" + do.getTimeId() # Control for Load Test
        control_object.control_elements['description']="This control is created by ARTY as part of the Load Performance Test"  
        
        if do.countOfAnyObjectLHS("Standard") > 0:
            firstItemStandard = do.getFirstItemFromASection("Standard")
        
        # uncomment later
        do.createObjectIncrementingNaming(program_object, "Program", 1)     
        do.createObjectIncrementingNaming(standard_object, "Standard",1)  #case sensitive parameter & singularity

        # select "Standard1" created in the above is used in filling Section form
        do.createObjectIncrementingNaming(section_object, "Section", 25, firstItemStandard)  #case sensitive parameter & singularity
        do.createObjectIncrementingNaming(objective_object, "Objective", 125)
        do.createObjectIncrementingNaming(objective_object, "Control", 625)
开发者ID:amrishs,项目名称:ggrc-test,代码行数:44,代码来源:TestArtyCreate.py

示例3: testEventLog

# 需要导入模块: from helpers.Helpers import Helpers [as 别名]
# 或者: from helpers.Helpers.Helpers import getTimeId [as 别名]
    def testEventLog(self):
        self.testname="TestEventLog"
        self.setup()
        util = WebdriverUtilities()
        util.setDriver(self.driver)
        element = Elements()
        grcobject = GRCObject()
        do = Helpers(self)
        do.setUtils(util)
        do.login()

      # CREATE PROGRAM
        program_name = "Program_created_from_LHN"  + do.getTimeId()
        object_list = ["Regulation", "Contract", "Policy", "Standard"]
              
        last_created_object_link = do.createObject("Program", program_name)
      
        # MAP SOME OBJECTS
        for obj in object_list: 
            do.mapAObjectLHN(obj, program_name)      
              
        #do.selectInnerTabWhichAlreadyPresent("info")  
        do.selectInnerNavTab("info")      
        do.openObjectEditWindow()
        do.deleteObject()
                    
        do.selectMenuInTopRight("Admin Dashboard")
        do.selectMenuItemInnerNavDashBoard("Events")
            
        # when delete an object that has mapping, it automatically unmap and then delete
        self.assertTrue(do.verifyInfoInEventLogTable("unmapped from", 1), "Cannot find 'unmapped from Program' in the Event Log table.")
           
        # 4 times
        # 4 lines of "mapped to" because there are 4 mappings from the top
        self.assertTrue(do.verifyInfoInEventLogTable("mapped to", 2), "Cannot find 'map to:row2' in the Event Log table.")
        self.assertTrue(do.verifyInfoInEventLogTable("mapped to", 3), "Cannot find 'map to:row3' in the Event Log table.")
        self.assertTrue(do.verifyInfoInEventLogTable("mapped to", 4), "Cannot find 'map to:row4' in the Event Log table.")
        self.assertTrue(do.verifyInfoInEventLogTable("mapped to", 5), "Cannot find 'map to:row5' in the Event Log table.")
           
        # tests the "by whom" and "when at" fields
        self.assertTrue(do.verifyInfoInEventLogTable("whom", 2), "Cannot find 'whom' in the Event Log table.")
        self.assertTrue(do.verifyInfoInEventLogTable("when", 2), "Cannot find 'when' in the Event Log table.")
           
        # the program created should be logged
        self.assertTrue(do.verifyInfoInEventLogTable(program_name, 6), "Cannot find 'create program' in the Event Log table.")
        
        # verify that Prev and Next buttons work
        self.assertTrue(do.verifyPrevNextOperation(), "Fail verifying Prev and Next buttons.")
        
        
        # CORE-727
        print "CORE-727 is still open which causes this failure."
开发者ID:amrishs,项目名称:ggrc-test,代码行数:54,代码来源:TestEventLog.py

示例4: testControlMapWidget

# 需要导入模块: from helpers.Helpers import Helpers [as 别名]
# 或者: from helpers.Helpers.Helpers import getTimeId [as 别名]
    def testControlMapWidget(self):
        self.testname="TestControlMapWidget"
        self.setup()
        util = WebdriverUtilities()
        util.setDriver(self.driver)
        element = Elements()
        grcobject = GRCObject()
        do = Helpers(self)
        do.setUtils(util, "Control")
        do.login()
        control_name = "Control for Auto Mapping from Widget" + do.getTimeId()
        last_created_object_link = do.createObject("Control", control_name)

        for obj in grcobject.control_map_to_widget: 
            do.mapAObjectWidget(obj)
开发者ID:amrishs,项目名称:ggrc-test,代码行数:17,代码来源:TestControlMapWidget.py

示例5: testOrgGroupMapWidget

# 需要导入模块: from helpers.Helpers import Helpers [as 别名]
# 或者: from helpers.Helpers.Helpers import getTimeId [as 别名]
    def testOrgGroupMapWidget(self):
        self.testname="TestOrgGroupMapWidget"
        self.setup()
        util = WebdriverUtilities()
        util.setDriver(self.driver)
        element = Elements()
        grcobject = GRCObject()
        do = Helpers(self)
        do.setUtils(util, "OrgGroup")
        do.login()
        org_group_name = "OrgGroup for Auto Mapping from Widget"  +do.getTimeId()
        last_created_object_link = do.createObject("OrgGroup",org_group_name)

        for obj in grcobject.org_group_map_to_widget: 
            do.mapAObjectWidget(obj)
开发者ID:amrishs,项目名称:ggrc-test,代码行数:17,代码来源:TestOrgGroupMapWidget.py

示例6: testVendorMapWidget

# 需要导入模块: from helpers.Helpers import Helpers [as 别名]
# 或者: from helpers.Helpers.Helpers import getTimeId [as 别名]
    def testVendorMapWidget(self):
        self.testname="TestVendorMapWidget"
        self.setup()
        util = WebdriverUtilities()
        util.setDriver(self.driver)
        element = Elements()
        grcobject = GRCObject()
        do = Helpers(self)
        do.setUtils(util, "Vendor")
        do.login()
        vendor_name = "Vendor for Auto Mapping from Widget" + do.getTimeId()
        last_created_object_link = do.createObject("Vendor", vendor_name)

        for obj in grcobject.vendor_map_to_widget: 
            do.mapAObjectWidget(obj, "")
开发者ID:amrishs,项目名称:ggrc-test,代码行数:17,代码来源:TestVendorMapWidget.py

示例7: testPolicyMapWidget

# 需要导入模块: from helpers.Helpers import Helpers [as 别名]
# 或者: from helpers.Helpers.Helpers import getTimeId [as 别名]
    def testPolicyMapWidget(self):
        self.testname="TestPolicyMapWidget"
        self.setup()
        util = WebdriverUtilities()
        util.setDriver(self.driver)
        element = Elements()
        grcobject = GRCObject()
        do = Helpers(self)
        do.setUtils(util, "Policy")
        do.login()       
        policy_name = "Policy for Auto Mapping from Widget"  +do.getTimeId()
        last_created_object_link = do.createObject("Policy", policy_name)

        for obj in grcobject.policy_map_to_widget: 
            do.mapAObjectWidget(obj, policy_name, False, ("Section", "Objective", "Control"))
开发者ID:amrishs,项目名称:ggrc-test,代码行数:17,代码来源:TestPolicyMapWidget.py

示例8: testProgramMapWidget

# 需要导入模块: from helpers.Helpers import Helpers [as 别名]
# 或者: from helpers.Helpers.Helpers import getTimeId [as 别名]
    def testProgramMapWidget(self):
        self.testname="TestProgramMapWidget"
        self.setup()
        util = WebdriverUtilities()
        util.setDriver(self.driver)
        element = Elements()
        grcobject = GRCObject()
        do = Helpers(self)
        do.setUtils(util, "Program")
        do.login()       
        program_name = "Program for Auto Mapping from Widget" + do.getTimeId()
        last_created_object_link = do.createObject("Program", program_name)

        for obj in grcobject.program_map_to_widget: 
            do.mapAObjectWidget(obj, "", True, ("Control", "Objective", "System"))
开发者ID:amrishs,项目名称:ggrc-test,代码行数:17,代码来源:TestProgramMapWidget.py

示例9: testDataAssetMapWidget

# 需要导入模块: from helpers.Helpers import Helpers [as 别名]
# 或者: from helpers.Helpers.Helpers import getTimeId [as 别名]
    def testDataAssetMapWidget(self):
        self.testname="TestDataAssetMapWidget"
        self.setup()
        util = WebdriverUtilities()
        util.setDriver(self.driver)
        element = Elements()
        grcobject = GRCObject()
        do = Helpers(self)
        do.setUtils(util, "DataAsset")
        do.login()
        data_asset_name = "DataAsset for Auto Mapping from Widget"  +do.getTimeId()
        last_created_object_link = do.createObject("DataAsset",data_asset_name)

        for obj in grcobject.data_asset_map_to_widget: 
            do.mapAObjectWidget(obj)
开发者ID:amrishs,项目名称:ggrc-test,代码行数:17,代码来源:TestDataAssetMapWidget.py

示例10: testRiskCreate

# 需要导入模块: from helpers.Helpers import Helpers [as 别名]
# 或者: from helpers.Helpers.Helpers import getTimeId [as 别名]
 def testRiskCreate(self):
     self.testname="TestRiskCreate"
     self.setup()
     util = WebdriverUtilities()
     util.setDriver(self.driver)
     element = Elements()
     do = Helpers(self)
     do.setUtils(util)
     do.login()
     self.assertTrue(util.isElementPresent(element.dashboard_title), "no dashboard page found")
     do.OpenCreateNewRiskWindow(element.risk_widget_object_add_button)
     random_number= do.getTimeId()
     risk_name = "risk-auto-test"+random_number
     do.populateNewObjectData(risk_name)
     do.saveObjectData()
     do.waitForLeftNavToLoad()
     do.verifyObjectIsCreated("risks", risk_name)
开发者ID:amrishs,项目名称:ggrc-test,代码行数:19,代码来源:TestRiskCreate.py

示例11: testSectionEdit

# 需要导入模块: from helpers.Helpers import Helpers [as 别名]
# 或者: from helpers.Helpers.Helpers import getTimeId [as 别名]
 def testSectionEdit(self):
     self.testname="TestSectionEdit"
     self.setup()
     util = WebdriverUtilities()
     util.setDriver(self.driver)
     element = Elements()
     do = Helpers(self)
     grcobject = GRCObject()
     do.setUtils(util)
     do.login()
     object_name = "Auto_Section_" + do.getTimeId() + str(do.getRandomNumber())
     last_created_object_link = do.createObjectSaveAddAnother("Section", object_name, "unchecked")
     #object_name = str(util.getTextFromXpathString(last_created_object_link)).strip()
     do.navigateToObjectAndOpenObjectEditWindow("Section",last_created_object_link)
     do.populateObjectInEditWindow( object_name , grcobject.section_elements, grcobject.section_values)
     do.openObjectEditWindow()
     do.verifyObjectValues(grcobject.section_elements, grcobject.section_values)
     do.deleteObject()
开发者ID:amrishs,项目名称:ggrc-test,代码行数:20,代码来源:TestSectionEdit.py

示例12: testFacilityMapLHN

# 需要导入模块: from helpers.Helpers import Helpers [as 别名]
# 或者: from helpers.Helpers.Helpers import getTimeId [as 别名]
    def testFacilityMapLHN(self):
        self.testname="TestFacilityMapLHN"
        self.setup()
        util = WebdriverUtilities()
        util.setDriver(self.driver)
        element = Elements()
        grcobject = GRCObject()
        do = Helpers(self)
        do.setUtils(util, "Facility")
        do.login()
        system_name = "Facility for Auto Mapping from LHN"  +do.getTimeId()
        last_created_object_link = do.createObject("Facility", system_name)

        for obj in grcobject.facility_map_to_lhn: 
            do.mapAObjectLHN(obj)
       
        # test unmapping
        for obj in grcobject.facility_map_to_lhn: 
            self.assertTrue(do.unmapAObjectFromWidget(obj))
开发者ID:amrishs,项目名称:ggrc-test,代码行数:21,代码来源:TestFacilityMapLHN.py

示例13: testObjectiveMapLHN

# 需要导入模块: from helpers.Helpers import Helpers [as 别名]
# 或者: from helpers.Helpers.Helpers import getTimeId [as 别名]
 def testObjectiveMapLHN(self):
     self.testname="TestObjectiveMapLHN"
     self.setup()
     util = WebdriverUtilities()
     util.setDriver(self.driver)
     element = Elements()
     grcobject = GRCObject()
     do = Helpers(self)
     do.setUtils(util, "Objective")
     do.login()
     program_name = "Objective for Auto Mapping from LHN"  +do.getTimeId()
     last_created_object_link = do.createObject("Objective", program_name)
     for obj in grcobject.objective_map_to_lhn: 
         do.mapAObjectLHN(obj)
         #util.refreshPage()
    
     # test unmapping
     for obj in grcobject.objective_map_to_lhn: 
         self.assertTrue(do.unmapAObjectFromWidget(obj))
开发者ID:amrishs,项目名称:ggrc-test,代码行数:21,代码来源:TestObjectiveMapLHN.py

示例14: testObjectMapsToItself

# 需要导入模块: from helpers.Helpers import Helpers [as 别名]
# 或者: from helpers.Helpers.Helpers import getTimeId [as 别名]
 def testObjectMapsToItself(self):
     self.testname="TestObjectMapsToItself"
     self.setup()
     util = WebdriverUtilities()
     util.setDriver(self.driver)
     element = Elements()
     grcobject = GRCObject()
     do = Helpers(self)
     do.setUtils(util, "Contract")
     do.login()
     contract_name = "Contract for Auto Mapping from LHN"  +do.getTimeId()
     
     contract_map_to_lhn2 =  ["Contract", "Program"]
     for obj in grcobject.contract_map_to_lhn2:
         last_created_object_link = do.createObject(obj, contract_name)
         do.mapAObjectLHN(obj)
         #util.refreshPage()
    
     # test unmapping
     for obj in grcobject.contract_map_to_lhn: 
         self.assertTrue(do.unmapAObjectFromWidget(obj))
开发者ID:amrishs,项目名称:ggrc-test,代码行数:23,代码来源:TestObjectMapsToItself.py

示例15: testProgramAuditSetup

# 需要导入模块: from helpers.Helpers import Helpers [as 别名]
# 或者: from helpers.Helpers.Helpers import getTimeId [as 别名]
    def testProgramAuditSetup(self):
        self.testname="TestProgramAuditSetup"
        self.setup()
        util = WebdriverUtilities()
        util.setDriver(self.driver)
        element = Elements()
        grcobject = GRCObject()
        do = Helpers()
        do.setUtils(util)
        do.login()
        objectiveID = {}
        
        # 1: Create New Program 
        #program_name = "The Program for Auto Test of Audit"  
        #temporary to use one program with unique name
        current_time = do.getTimeId()

        program_name = "Program for Auto Test of Audit"  +current_time
        
        last_created_object_link = do.createObject("Program", program_name, "checked",True, config.username)
        #object_name = str(util.getTextFromXpathString(last_created_object_link)).strip() 
        
        # 2.  Navigate to that Program page
        #do.navigateToObjectWithSearch(program_name,"Program")
        do.navigateToObject("Program",last_created_object_link)
        util.max_screen()
         
        # 3. Select Regulations tab in Object pg Nav to bring up the Mapped Regulations widget
        # 4. Click +Regulation button to bring up modal selector for mapping Regulation to the Program
        do.navigateToMappingWindowForObject("Regulation")
        
        # 5. In modal, click green +Regulation button to bring up create a new Regulation modal
        util.clickOn(element.mapping_modal_add_button)
        
        # 6.  Fill in title for the new Regulation, "Regulation for Auto Test of Audit"
        # 7.  click Save (this dismisses the 2nd modal and puts the newly created Regulation at the top of the list in the 1st modal (the mapping modal)
        regulation_name = "Regulation for Auto Test of Audit"+current_time
        do.createObject("Regulation", regulation_name,"unchecked",False)
        
        # 8.  Select "Regulation for Auto test of Audit" at top of list then click Map button (dismisses modal and returns to Program pg now with the Regulation mapped)
        mapped_object_id = do.mapFirstObject("Regulation",False,regulation_name)
        
        # 9.  Click on Regulation for Auto Test of Audit in Mapped Regulations widget to expand the drop down and reveal Sections list
        #expand regulation area
        mapped_object_link = element.mapped_object.replace("OBJECT", "regulation").replace("ID", mapped_object_id)
        util.waitForElementToBePresent(mapped_object_link)
        self.assertTrue(util.isElementPresent(mapped_object_link),"doesn't see the newly created mapped object")
        util.clickOn(mapped_object_link)
        
        # 10.  Hover over +Sections link to reveal 3 options, then click on Create Section to launch the Create new Section modal
        # 11.  New Section modal:Title: "Section 1 of Regulation for Auto Test of Audit"
        # 12. Click Save - returns you to the Program pg > Regulation widget > Section now shows in revealed Sections display area
        do.createSectionFor("regulation",mapped_object_id,"Section 1 of Regulation for Auto Test of Audit"+current_time)
        section_id= do.getTheIdOfTheLastCreated("section")
        # 13. Click on "Section 1 of Regulation for Auto Test of Audit" title in the Sections display area - this reveals the Text of Section we entered and the "OBJECTIVES, CONTROLS, AND BUSINESS OBJECTS (0)" display area.
        #expand section area
        util.waitForElementToBePresent(element.sections_area_first_section)
        self.assertTrue(util.isElementPresent(element.sections_area_first_section),"doesn't see the newly created Section in the section area")
        util.clickOn(element.sections_area_first_section)
        self.assertTrue(util.isElementPresent(element.theShortDescriptionElement),"doesn't see the short description element")
        #make objectiveID link visible
        util.waitForElementToBePresent(element.section_area_add_object_link)
        self.assertTrue(util.isElementPresent(element.section_area_add_object_link),"doesn't see +Objective link")
        
        # 16. Repeat steps  14-15 3 times, increment Objective name, leave the next bullet point in description
        util.max_screen()
        for n in range(3):
            print "objective number " + str(n+1)
            # 14.  Hover over +Object to reveal 2 options

            util.scrollIntoView(element.section_area_add_object_link)
            util.hoverOverAndWaitFor(element.section_area_add_object_link, element.section_area_add_objective_link)
            self.assertTrue(util.isElementPresent(element.section_area_add_objective_link),"doesn't see the section_area_add_objective_link")
            
            # 15.  Click on +Objectives to open "Map New Objective to Section 1 of Regulation for Auto Test of Audit" modal, input data and click Save
            #util.clickOn(element.section_area_add_object_link)
            util.clickOn( element.section_area_add_objective_link)
        
            
            
            #create new objective
            do.createObjectives(grcobject.objective_title[n], grcobject.objective_description[n])
            last_created_object_element = element.objective_elemet_in_the_inner_tree_with_index.replace("INDEX",str(n+1 ))
            print "the last created objective element is "+last_created_object_element
            util.waitForElementToBePresent(last_created_object_element)
            self.assertTrue(util.isElementPresent(last_created_object_element), "cannot see the newly created objective")
            # store objectiveID ids
            objective_id= do.getTheIdOfTheLastCreatedObjective(last_created_object_element)
            objectiveID[n]=objective_id
            print objectiveID[n]
           
            

    
        # 17.after creating 3 Objectives, Hover over +Object 1 more time but this time click on +Object to launch the multi object mapper modal 
        
        #util.clickOnAndWaitFor(element.section_area_add_object_link, element.section_area_add_objective_link)
        util.clickOn(element.section_area_add_object_link)
        
        # 18.  Select Controls from top filter selector in modal
#.........这里部分代码省略.........
开发者ID:amrishs,项目名称:ggrc-test,代码行数:103,代码来源:TestProgramAuditSetup.py


注:本文中的helpers.Helpers.Helpers.getTimeId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。