本文整理汇总了Python中helpers.Helpers.Helpers类的典型用法代码示例。如果您正苦于以下问题:Python Helpers类的具体用法?Python Helpers怎么用?Python Helpers使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Helpers类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testAllTabsIntegrity
def testAllTabsIntegrity(self):
self.testname="TestAllTabsIntegrity"
self.setup()
util = WebdriverUtilities()
util.setDriver(self.driver)
element = Elements()
do = Helpers(self)
do.setUtils(util)
do.login()
directive_xpath = '//a[(@class="governance list-toggle" and @data-object-singular="OBJECT")]'
self.assertEqual("PROGRAMS", self._returnStringUpToFirstSpace(do.util.getTextFromXpathString(element.left_nav_expand_object_section_link.replace("OBJECT", "Program"))))
self.assertEqual("AUDITS", self._returnStringUpToFirstSpace(do.util.getTextFromXpathString(element.left_nav_expand_object_section_link.replace("OBJECT", "Audit"))))
temp = do.util.getTextFromXpathString('//a[(@class="governance list-toggle" and @data-object-singular="Regulation")]')
self.assertEqual("REGULATIONS", self._returnStringUpToFirstSpace(do.util.getTextFromXpathString(self.directive_xpath.replace("OBJECT", "Regulation"))))
self.assertEqual("POLICIES", self._returnStringUpToFirstSpace(directive_xpath.replace("OBJECT", "Policy")))
self.assertEqual("STANDARDS", self._returnStringUpToFirstSpace(directive_xpath.replace("OBJECT", "Standard")))
self.assertEqual("CONTRACTS", self._returnStringUpToFirstSpace(directive_xpath.replace("OBJECT", "Contract")))
self.assertEqual("CLAUSES", self._returnStringUpToFirstSpace(directive_xpath.replace("OBJECT", "Clause")))
self.assertEqual("Sections", self._returnStringUpToFirstSpace(directive_xpath.replace("OBJECT", "Section")))
self.assertEqual("Objectives", self._returnStringUpToFirstSpace(do.util.getTextFromXpathString(element.left_nav_expand_object_section_link.replace("OBJECT", "Objective"))))
self.assertEqual("Controls", self._returnStringUpToFirstSpace(do.util.getTextFromXpathString(element.left_nav_expand_object_section_link.replace("OBJECT", "Control"))))
self.assertEqual("People", self._returnStringUpToFirstSpace(do.util.getTextFromXpathString(element.left_nav_expand_object_section_link.replace("OBJECT", "Person"))))
self.assertEqual("Org Groups", do.util.getTextFromXpathString(element.left_nav_org_group_link)[0:10])
self.assertEqual("Systems", self._returnStringUpToFirstSpace(do.util.getTextFromXpathString(element.left_nav_expand_object_section_link.replace("OBJECT", "System"))))
self.assertEqual("Processes", self._returnStringUpToFirstSpace(do.util.getTextFromXpathString(element.left_nav_expand_object_section_link.replace("OBJECT", "Process"))))
self.assertEqual("Data Assets", do.util.getTextFromXpathString(element.left_nav_data_asset_link)[0:11])
self.assertEqual("Products", self._returnStringUpToFirstSpace(do.util.getTextFromXpathString(element.left_nav_expand_object_section_link.replace("OBJECT", "Product"))))
self.assertEqual("Projects", self._returnStringUpToFirstSpace(do.util.getTextFromXpathString(element.left_nav_expand_object_section_link.replace("OBJECT", "Project"))))
self.assertEqual("Facilities", self._returnStringUpToFirstSpace(do.util.getTextFromXpathString(element.left_nav_expand_object_section_link.replace("OBJECT", "Facility"))))
self.assertEqual("Markets", do.util.getTextFromXpathString(element.left_nav_market_link)[0:7])
示例2: testReindex
def testReindex(self):
self.testname="deleteObject"
self.setup()
util = WebdriverUtilities()
util.setDriver(self.driver)
do = Helpers(self)
do.setUtils(util)
do.login()
util.driver.execute_script(REINDEX_SCRIPT)
time.sleep(90)
示例3: testLogin
def testLogin(self):
self.testname="TestLogin"
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")
示例4: testSectionCreate
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()
示例5: testProgramCreate
def testProgramCreate(self):
self.testname="TestProgramCreate"
self.setup()
util = WebdriverUtilities()
util.setDriver(self.driver)
element = Elements()
do = Helpers(self)
do.setUtils(util)
do.login()
last_created_object_link =do.createObject("Program")
do.navigateToObjectAndOpenObjectEditWindow("Program",last_created_object_link)
do.deleteObject()
示例6: testSystemCreate
def testSystemCreate(self):
self.testname="TestSystemCreate"
self.setup()
util = WebdriverUtilities()
util.setDriver(self.driver)
do = Helpers(self)
do.setUtils(util)
do.login()
last_created_object_link =do.createObject("System")
#object_name = str(util.getTextFromXpathString(last_created_object_link)).strip()
do.navigateToObjectAndOpenObjectEditWindow("System",last_created_object_link)
do.deleteObject()
示例7: testVendorMapWidget
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, "")
示例8: testPolicyMapWidget
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"))
示例9: testProgramMapWidget
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"))
示例10: testDataAssetMapWidget
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)
示例11: testControlMapWidget
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)
示例12: testOrgGroupMapWidget
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)
示例13: testObjectiveMapLHN
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))
示例14: testFacilityMapLHN
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))
示例15: testObjectMapsToItself
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))