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


Python Helpers.createObjectSaveAddAnother方法代码示例

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


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

示例1: testSaveAndAddAnotherProject

# 需要导入模块: from helpers.Helpers import Helpers [as 别名]
# 或者: from helpers.Helpers.Helpers import createObjectSaveAddAnother [as 别名]
 def testSaveAndAddAnotherProject(self):
     self.testname="TestSaveAndAddAnotherProject"
     self.setup()
     util = WebdriverUtilities()
     util.setDriver(self.driver)
     element = Elements()
     do = Helpers(self)
     do.setUtils(util)
     do.login()
     
     object_1_name = do.generateNameForTheObject("Project")
     do.delay(10) # count number does not appear right away, weird
     object_2_name = "Project_" + str(do.getRandomNumber())
     
     do.ensureLHNSectionExpanded("Project")
     count_before = do.countOfAnyObjectLHS("Project")
     do.createObjectSaveAddAnother("Project", object_1_name, "unchecked", True, "", False)
     do.createObjectSaveAddAnother("Project", object_2_name, "unchecked", False, "", True)
     do.clearSearchBoxOnLHS() #clear any text so total count displays
     do.ensureLHNSectionExpanded("Project")
     count_after = do.countOfAnyObjectLHS("Project")
           
     do.assertEqual(count_after, count_before+2, "Count has not incremented by 1 as expected.") 
            
     print "Object 1: "
     object_1_link = do.verifyObjectIsCreatedinLHN("Project", object_1_name)
     do.navigateToObjectAndOpenObjectEditWindow("Project",object_1_link)
     do.deleteObject()
     
     print "Object 2: "
     object_2_link = do.verifyObjectIsCreatedinLHN("Project", object_2_name)
     do.navigateToObjectAndOpenObjectEditWindow("Project",object_2_link)
     do.deleteObject()        
开发者ID:amrishs,项目名称:ggrc-test,代码行数:35,代码来源:TestSaveAndAddAnotherProject.py

示例2: testSectionCreate

# 需要导入模块: from helpers.Helpers import Helpers [as 别名]
# 或者: from helpers.Helpers.Helpers import createObjectSaveAddAnother [as 别名]
 def testSectionCreate(self):
     self.testname="TestSectionCreate"
     self.setup()
     util = WebdriverUtilities()
     util.setDriver(self.driver)
     element = Elements()
     do = Helpers(self)
     do.setUtils(util)
     do.login()
     last_created_object_link =do.createObjectSaveAddAnother("Section", "", "unchecked")
     do.navigateToObjectAndOpenObjectEditWindow("Section",last_created_object_link)
     do.deleteObject()
开发者ID:amrishs,项目名称:ggrc-test,代码行数:14,代码来源:TestSectionCreate.py

示例3: testSectionEdit

# 需要导入模块: from helpers.Helpers import Helpers [as 别名]
# 或者: from helpers.Helpers.Helpers import createObjectSaveAddAnother [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


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