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


Python WebdriverUtilities.setDriver方法代码示例

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


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

示例1: testJasmineExample

# 需要导入模块: from helperRecip.WebdriverUtilities import WebdriverUtilities [as 别名]
# 或者: from helperRecip.WebdriverUtilities.WebdriverUtilities import setDriver [as 别名]
 def testJasmineExample(self):
     self.setup_jasmine()
     util = WebdriverUtilities()
     util.setDriver(self.driver)
     element = Elements()
     do = Helpers()
     do.setUtils(util)
     util.waitForElementToBePresent(element.jasmine_results)
     self.assertTrue(util.isElementPresent(element.jasmine_results), "no results on the page found")
开发者ID:SilasX,项目名称:ggrc-test,代码行数:11,代码来源:TestJasmineExample.py

示例2: testLogin

# 需要导入模块: from helperRecip.WebdriverUtilities import WebdriverUtilities [as 别名]
# 或者: from helperRecip.WebdriverUtilities.WebdriverUtilities import setDriver [as 别名]
 def testLogin(self):
     self.testname="testLogin"
     self.setup()
     util = WebdriverUtilities()
     util.setDriver(self.driver)
     element = Elements()
     do = Helpers()
     do.setUtils(util)
     do.Login()
     self.assertTrue(util.isElementPresent(element.dashboard_title), "no dashboard page found")
开发者ID:bmomberger-reciprocity,项目名称:ggrc-test,代码行数:12,代码来源:TestLogin.py

示例3: testReindex

# 需要导入模块: from helperRecip.WebdriverUtilities import WebdriverUtilities [as 别名]
# 或者: from helperRecip.WebdriverUtilities.WebdriverUtilities import setDriver [as 别名]
 def testReindex(self):
     self.testname="deleteObject"
     self.setup()
     util = WebdriverUtilities()
     util.setDriver(self.driver)
     do = Helpers()
     do.setUtils(util)
     do.login()
     util.driver.execute_script(REINDEX_SCRIPT)
     time.sleep(90)
开发者ID:dtzinov,项目名称:ggrc-test,代码行数:12,代码来源:Reindex.py

示例4: testRegulationCreate

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

示例5: testFacilityCreate

# 需要导入模块: from helperRecip.WebdriverUtilities import WebdriverUtilities [as 别名]
# 或者: from helperRecip.WebdriverUtilities.WebdriverUtilities import setDriver [as 别名]
 def testFacilityCreate(self):
     self.testname="testFacilityCreate"
     self.setup()
     util = WebdriverUtilities()
     util.setDriver(self.driver)
     element = Elements()
     do = Helpers()
     do.setUtils(util)
     do.Login()
     last_created_object_link =do.CreateObject("Facility")
     do.NavigateToObjectAndOpenObjectEditWindow("Facility",last_created_object_link)
     do.deleteObject()
开发者ID:bmomberger-reciprocity,项目名称:ggrc-test,代码行数:14,代码来源:TestFacilityCreate.py

示例6: testSystemCreate

# 需要导入模块: from helperRecip.WebdriverUtilities import WebdriverUtilities [as 别名]
# 或者: from helperRecip.WebdriverUtilities.WebdriverUtilities import setDriver [as 别名]
 def testSystemCreate(self):
     self.testname="testSystemCreate"
     self.setup()
     util = WebdriverUtilities()
     util.setDriver(self.driver)
     do = Helpers()
     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()
开发者ID:bmomberger-reciprocity,项目名称:ggrc-test,代码行数:14,代码来源:TestSystemCreate.py

示例7: testContractMapLHN

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

示例8: testFacilityMapWidget

# 需要导入模块: from helperRecip.WebdriverUtilities import WebdriverUtilities [as 别名]
# 或者: from helperRecip.WebdriverUtilities.WebdriverUtilities import setDriver [as 别名]
 def testFacilityMapWidget(self):
     self.testname="TestFacilityMapWidget"
     self.setup()
     util = WebdriverUtilities()
     util.setDriver(self.driver)
     element = Elements()
     grcobject = GRCObject()
     do = Helpers()
     do.setUtils(util, "Facility")
     do.login()
     facility_name = "Facility for Auto Mapping from Widget"  +do.getTimeId()
     last_created_object_link = do.createObject("Facility",facility_name)
     do.navigateToObjectWithSearch(facility_name, "Facility")
     for obj in grcobject.facility_map_to_widget: 
         do.mapAObjectWidget(obj)
开发者ID:dtzinov,项目名称:ggrc-test,代码行数:17,代码来源:TestFacilityMapWidget.py

示例9: testProgramMapWidget

# 需要导入模块: from helperRecip.WebdriverUtilities import WebdriverUtilities [as 别名]
# 或者: from helperRecip.WebdriverUtilities.WebdriverUtilities import setDriver [as 别名]
 def testProgramMapWidget(self):
     self.testname="TestProgramMapWidget"
     self.setup()
     util = WebdriverUtilities()
     util.setDriver(self.driver)
     element = Elements()
     grcobject = GRCObject()
     do = Helpers()
     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)
     do.navigateToObjectWithSearch(program_name, "Program")
     for obj in grcobject.program_map_to_widget: 
         do.mapAObjectWidget(obj, True, ("Control"))
开发者ID:dtzinov,项目名称:ggrc-test,代码行数:17,代码来源:TestProgramMapWidget.py

示例10: testOrgGroupMapWidget

# 需要导入模块: from helperRecip.WebdriverUtilities import WebdriverUtilities [as 别名]
# 或者: from helperRecip.WebdriverUtilities.WebdriverUtilities import setDriver [as 别名]
 def testOrgGroupMapWidget(self):
     self.testname="TestOrgGroupMapWidget"
     self.setup()
     util = WebdriverUtilities()
     util.setDriver(self.driver)
     element = Elements()
     grcobject = GRCObject()
     do = Helpers()
     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)
     do.navigateToObjectWithSearch(org_group_name, "OrgGroup")
     for obj in grcobject.org_group_map_to_widget: 
         do.mapAObjectWidget(obj)
开发者ID:dtzinov,项目名称:ggrc-test,代码行数:17,代码来源:TestOrgGroupMapWidget.py

示例11: testPolicyMapWidget

# 需要导入模块: from helperRecip.WebdriverUtilities import WebdriverUtilities [as 别名]
# 或者: from helperRecip.WebdriverUtilities.WebdriverUtilities import setDriver [as 别名]
 def testPolicyMapWidget(self):
     self.testname="TestRPolicyMapWidget"
     self.setup()
     util = WebdriverUtilities()
     util.setDriver(self.driver)
     element = Elements()
     grcobject = GRCObject()
     do = Helpers()
     do.setUtils(util)
     do.login()
     program_name = "Policy for Auto Mapping from Widget"  +do.getTimeId()
     last_created_object_link = do.createObject("Policy", program_name)
     #object_name = str(util.getTextFromXpathString(last_created_object_link)).strip() 
     do.navigateToObject("Policy",last_created_object_link)
     for obj in grcobject.policy_map_to_widget: 
         do.mapAObjectWidget(obj)
开发者ID:SilasX,项目名称:ggrc-test,代码行数:18,代码来源:TestPolicyMapWidget.py

示例12: testMarketMapLHN

# 需要导入模块: from helperRecip.WebdriverUtilities import WebdriverUtilities [as 别名]
# 或者: from helperRecip.WebdriverUtilities.WebdriverUtilities import setDriver [as 别名]
 def testMarketMapLHN(self):
     self.testname="TestMarketMapLHN"
     self.setup()
     util = WebdriverUtilities()
     util.setDriver(self.driver)
     element = Elements()
     grcobject = GRCObject()
     do = Helpers()
     do.setUtils(util, "Market")
     do.login()
     system_name = "Market for Auto Mapping from LHN"  +do.getTimeId()
     last_created_object_link = do.createObject("Market", system_name)
     #object_name = str(util.getTextFromXpathString(last_created_object_link)).strip() 
     do.navigateToObjectWithSearch(system_name, "Market")
     for obj in grcobject.market_map_to_lhn: 
         do.mapAObjectLHN(obj)
开发者ID:dtzinov,项目名称:ggrc-test,代码行数:18,代码来源:TestMarketMapLHN.py

示例13: testDeleteObject

# 需要导入模块: from helperRecip.WebdriverUtilities import WebdriverUtilities [as 别名]
# 或者: from helperRecip.WebdriverUtilities.WebdriverUtilities import setDriver [as 别名]
    def testDeleteObject(self):
        self.testname="deleteObject"
        self.setup()
        util = WebdriverUtilities()
        util.setDriver(self.driver)
        element = Elements()
        grcobject = GRCObject()
        do = Helpers()
        do.setUtils(util)
        do.login()
        for section in [#"Program",
                        #"Regulation",
                        #"Contract",
                        #"Policy",
                        #"Control",
                        # "Objective",

                        #"System",
                        #"Process",
                        #"Data",
                        #"Product",
                        #"Project",
                        #"Facility",
                        #"Market",
                        #"Group"
                           ]:
            print "Starting Deletion of Objects for " + section
            deleted_objects=0
            do.checkMyWorkBox()
            while True:
                object_left_nav_section_object_link = element.left_nav_expand_object_section_link.replace("OBJECT", section)
                util.clickOn(object_left_nav_section_object_link)
                util.inputTextIntoField("Auto", element.left_nav_search_input_textfield)
                util.pressEnterKey(element.left_nav_search_input_textfield)
                left_nav_first_link = element.left_nav_first_object_link_in_the_section.replace("SECTION",section)
                util.waitForElementToBePresent(left_nav_first_link)
                lef_nav_objects_for_deleteion_in_section = element.left_nav_objects_candidate_for_deletion.replace("SECTION",section )
                number_of_auto_objects = util.getNumberOfOccurences(lef_nav_objects_for_deleteion_in_section)
                print "number of auto objects " + str(number_of_auto_objects)
                if number_of_auto_objects==0:
                    break
                print lef_nav_objects_for_deleteion_in_section
                link = element.left_nav_first_object_link_in_the_section.replace("SECTION",section) 
                do.navigateToObjectAndOpenObjectEditWindow(section,link, refresh_page=False)
                do.deleteObject()
                deleted_objects = deleted_objects+1
            print "Finished Deletion of Objects for " + section +", deleted objects:" + str(deleted_objects)
开发者ID:dtzinov,项目名称:ggrc-test,代码行数:49,代码来源:DeleteObjects.py

示例14: testControlEdit

# 需要导入模块: from helperRecip.WebdriverUtilities import WebdriverUtilities [as 别名]
# 或者: from helperRecip.WebdriverUtilities.WebdriverUtilities import setDriver [as 别名]
 def testControlEdit(self):
     self.testname="testControlEdit"
     self.setup()
     util = WebdriverUtilities()
     util.setDriver(self.driver)
     element = Elements()
     do = Helpers()
     grcobject = GRCObject()
     do.setUtils(util)
     do.Login()
     last_created_object_link = do.CreateObject("Control")
     object_name = util.getTextFromXpathString(last_created_object_link)
     do.NavigateToObjectAndOpenObjectEditWindow("Control",last_created_object_link)
     do.PopulateObjectInEditWindow( object_name , grcobject.control_elements, grcobject.control_values)
     do.ShowHiddenValues()
     do.verifyObjectValues( grcobject.control_elements, grcobject.control_values)
     do.deleteObject()
开发者ID:bmomberger-reciprocity,项目名称:ggrc-test,代码行数:19,代码来源:TestControlEdit.py

示例15: testRiskCreate

# 需要导入模块: from helperRecip.WebdriverUtilities import WebdriverUtilities [as 别名]
# 或者: from helperRecip.WebdriverUtilities.WebdriverUtilities import setDriver [as 别名]
 def testRiskCreate(self):
     self.testname="testRiskCreate"
     self.setup()
     util = WebdriverUtilities()
     util.setDriver(self.driver)
     element = Elements()
     do = Helpers()
     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:bmomberger-reciprocity,项目名称:ggrc-test,代码行数:19,代码来源:TestRiskCreate.py


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