本文整理汇总了Python中helpers.Helpers.Helpers.saveObjectData方法的典型用法代码示例。如果您正苦于以下问题:Python Helpers.saveObjectData方法的具体用法?Python Helpers.saveObjectData怎么用?Python Helpers.saveObjectData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类helpers.Helpers.Helpers
的用法示例。
在下文中一共展示了Helpers.saveObjectData方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testRiskCreate
# 需要导入模块: from helpers.Helpers import Helpers [as 别名]
# 或者: from helpers.Helpers.Helpers import saveObjectData [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)
示例2: testProgramAudit
# 需要导入模块: from helpers.Helpers import Helpers [as 别名]
# 或者: from helpers.Helpers.Helpers import saveObjectData [as 别名]
#.........这里部分代码省略.........
do.dismissFlashMessages()
for objective_title in grcobject.objective_title:
objective_title_element = element.audit_pbc_request.replace("TITLE", objective_title)
print objective_title_element
util.waitForElementToBePresent(objective_title_element)
self.assertTrue(util.isElementPresent(objective_title_element), "do not see the pbc request " + objective_title_element )
util.scrollIntoView(objective_title_element)
#do.waitForAlertSuccessMessages()
####7. Change Objective 2 for Auto test of Audit - Type: Interview
###print "Change Objective 2 for Auto test of Audit - Type: Interview"
#### navigate into PBC edit modal
####click on "Objective 2 for Auto test of Audit" to open 2nd tier info
###print "click on Objective 2 for Auto test of Audit to open 2nd tier info"
###do.expandCollapseRequest(grcobject.objective_title[1])
####click on Edit PBC Request
###util.waitForElementToBePresent(element.audit_pbc_request_expanded_content_edit_link)
###self.assertTrue(util.isElementPresent(element.audit_pbc_request_expanded_content_edit_link), "do not see the Edit link in the expanded request " )
###util.clickOn(element.audit_pbc_request_expanded_content_edit_link)
###objective2_selected_option = element.audit_pbc_request_modal_type_select_selected_option
###util.waitForElementToBePresent(element.audit_pbc_request_modal_type_select)
###util.selectFromDropdownUntilSelected(element.audit_pbc_request_modal_type_select, "Interview")
####verifying the selected option
###
###util.waitForElementToBePresent(objective2_selected_option)
###do.saveObjectData()
###util.clickOn(element.audit_pbc_request_expanded_content_edit_link)
###new_value = util.getTextFromXpathString(objective2_selected_option)
###self.assertTrue(new_value =="Interview" , "the selected option is not Interview" )
####Delete
###print "deleting Request"
###do.deleteObject()
### #8. Change Objective 3 for Auto test of Audit - Type: Population Sample
###objective3_select = element.audit_pbc_request_type_select.replace("TITLE", grcobject.objective_title[2] )
###do.expandCollapseRequest(grcobject.objective_title[2])
####click on Edit PBC Request
###util.waitForElementToBePresent(element.audit_pbc_request_expanded_content_edit_link)
###self.assertTrue(util.isElementPresent(element.audit_pbc_request_expanded_content_edit_link), "do not see the Edit link in the expanded request " )
###util.clickOn(element.audit_pbc_request_expanded_content_edit_link)
###objective3_selected_option = element.audit_pbc_request_modal_type_select_selected_option
###util.waitForElementToBePresent(element.audit_pbc_request_modal_type_select)
###util.selectFromDropdownUntilSelected(element.audit_pbc_request_modal_type_select, "Population Sample")
####verifying the selected option
###
###util.waitForElementToBePresent(objective3_selected_option)
###do.saveObjectData()
###util.clickOn(element.audit_pbc_request_expanded_content_edit_link)
###new_value = util.getTextFromXpathString(objective2_selected_option)
###self.assertTrue(new_value == "Population Sample" , "the selected option is not Population Sample" )
####Delete
###print "deleting Response"
###do.deleteObject()
#9. Click on Objective 1 for Auto Test of Audit to open 2nd tier info (Documentation Response)
#util.scrollIntoView(newly_created_audit_open_link)
do.expandCollapseRequest(grcobject.objective_title[0])
do.setRequestToRespondable(grcobject.objective_title[0])
# open the response model and fill it out
new_response_button = element.audit_pbc_request_response_create.replace("TITLE", grcobject.objective_title[0])
util.waitForElementToBePresent(new_response_button)
util.clickOn(new_response_button)
new_response_title = "Response to " + grcobject.objective_title[0]
do.NewResponseCreate(new_response_title)
response_element = element.audit_pbc_request_response2.replace("TITLE", grcobject.objective_title[0]).replace("RESPONSE", new_response_title)
print "response element " + response_element
util.waitForElementToBePresent(response_element)
util.scrollIntoView(response_element)
time.sleep(20)
self.assertTrue(util.isElementPresent(response_element), "can't see the new Response for the request link")
# look for edit button
new_response_edit_link = element.audit_pbc_request_expanded_response_edit_link2.replace("TITLE", grcobject.objective_title[0]).replace("RESPONSE", new_response_title)
util.waitForElementToBePresent(new_response_edit_link)
util.clickOn(new_response_edit_link)
# need to re-open
# verify assignee is the same as audit lead ([email protected])
pbc_response_elements = {
# name is description, but functions more like a title in
# the context of the verifyObjectValues helper
"description": element.response_title,
"owner": element.response_assignee,
}
pbc_response_values = {
"description": new_response_title,
"owner": do.current_user_email(),
}
do.verifyObjectValues(pbc_response_elements, pbc_response_values, "Audit")
do.saveObjectData()
audit_edit_button = newly_created_audit + element.audit_edit
util.scrollIntoView(audit_edit_button)
util.clickOn(audit_edit_button)
do.deleteObject()