本文整理汇总了Python中helperRecip.WebdriverUtilities.WebdriverUtilities.hoverOver方法的典型用法代码示例。如果您正苦于以下问题:Python WebdriverUtilities.hoverOver方法的具体用法?Python WebdriverUtilities.hoverOver怎么用?Python WebdriverUtilities.hoverOver使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类helperRecip.WebdriverUtilities.WebdriverUtilities
的用法示例。
在下文中一共展示了WebdriverUtilities.hoverOver方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testProgramAuditInterviewRequest
# 需要导入模块: from helperRecip.WebdriverUtilities import WebdriverUtilities [as 别名]
# 或者: from helperRecip.WebdriverUtilities.WebdriverUtilities import hoverOver [as 别名]
#.........这里部分代码省略.........
util.waitForElementToBePresent(response_element)
self.assertTrue(util.isElementPresent(response_element), "do not see the Respond element in the expanded Request section for "+ grcobject.objective_title[1] )
print "expanding response and Edit PBC Response "
util.clickOn(response_element) #to expand the response
util.waitForElementToBePresent(element.audit_pbc_request_expanded_response_edit_link)
self.assertTrue(util.isElementPresent(element.audit_pbc_request_expanded_response_edit_link), "do not see the Edit PBS Response link in the expanded Request section for "+ grcobject.objective_title[1] )
util.clickOn(element.audit_pbc_request_expanded_response_edit_link)
#Delete
print "deleting Response"
do.deleteObject()
#collapse back the request
print "collapse back the request"
do.expandCollapseRequest(grcobject.objective_title[1])
time.sleep(3)
util.selectFromDropdownUntilSelected(objective2_select, "Interview")
time.sleep(3)
util.waitForElementToBePresent(objective2_selected_option)
new_value = util.getTextFromXpathString(objective2_selected_option)
self.assertTrue(new_value =="Interview" , "the selected option is not Interview" )
#10. Click on Objective 2 for Auto Test of Audit to open 2nd tier info (Interview)
print "click on Objective 2 for Auto test of Audit to open 2nd tier info"
do.expandCollapseRequest(grcobject.objective_title[1])
objective2_select = element.audit_pbc_request_type_select.replace("TITLE",grcobject.objective_title[1] )
util.waitForElementToBePresent(objective2_select)
util.selectFromDropdownUntilSelected(objective2_select, "Interview") # didn't work the first time
print "Hover over +PBC Request then click on Create PBC Response to launch modal"
add_pbc_response_link_within_the_objective = element.audit_pbc_request.replace("TITLE",grcobject.objective_title[1] )+element.section_add_link
create_pbc_response_link_within_the_objective = element.audit_pbc_request.replace("TITLE",grcobject.objective_title[1] )+element.section_create_link
util.waitForElementToBePresent(add_pbc_response_link_within_the_objective)
util.scrollIntoView(add_pbc_response_link_within_the_objective)
util.hoverOverAndWaitFor(add_pbc_response_link_within_the_objective,create_pbc_response_link_within_the_objective)
util.clickOn(add_pbc_response_link_within_the_objective)
util.clickOn(create_pbc_response_link_within_the_objective)
#Description field : "Response foir Interview Type", Save
print "creating new interview response"
do.NewResponseCreate("Response for Interview Type")
#Click on Response for Interview Type header to reveal response 2nd tier info
#click +Object to open Map Object Selector. Change top filter to Org Group if neccessary (should not be). Choose Reciprocity Dev Team and hit Map button. (use search to find this if easier to implement)
#Confirm Reciprocity Dev Team is mapped to the Response and appears in the area provided
#after creating a new response, the whole response section gets expanded automatically now,
#just need to wait for all elements to load (+Object, +Person, + Meeting)
add_object_link = element.audit_pbc_request_response_add_object_link_within_response.replace("TITLE",grcobject.objective_title[1] )
add_person_link = element.audit_pbc_request_response_add_person_within_response.replace("TITLE",grcobject.objective_title[1] )
add_meeting_link = element.audit_pbc_request_response_add_meeting.replace("TITLE",grcobject.objective_title[1] )
util.waitForElementToBePresent(add_object_link)
self.assertTrue(util.isElementPresent(add_object_link), "do not see the open close button for the response")
util.waitForElementToBePresent(add_person_link)
self.assertTrue(util.isElementPresent(add_person_link), "do not see the + Person link")
util.waitForElementToBePresent(add_meeting_link)
self.assertTrue(util.isElementPresent(add_meeting_link), "do not see the + Meeting link")
#click +Object to open Map Object Selector.
util.clickOn(add_object_link)
#Change top filter to Org Group.
util.waitForElementToBePresent(element.mapping_modal_window)
self.assertTrue(util.isElementPresent(element.mapping_modal_window), "do not see the modal window")
util.waitForElementToBePresent(element.mapping_modal_top_filter_selector_dropdown)
示例2: testProgramAudit
# 需要导入模块: from helperRecip.WebdriverUtilities import WebdriverUtilities [as 别名]
# 或者: from helperRecip.WebdriverUtilities.WebdriverUtilities import hoverOver [as 别名]
#.........这里部分代码省略.........
util.refreshPage()
#waiting to audit to appear back
newly_created_audit = element.audit_area_created_audit.replace("AUDIT_TITLE", new_audit_title)
print newly_created_audit
util.waitForElementToBePresent(newly_created_audit)
self.assertTrue(util.isElementPresent(newly_created_audit), "do not see the newly created audit " +new_audit_title )
newly_created_audit_open_link = element.audit_area_created_audit_open_link.replace("AUDIT_TITLE", new_audit_title)
print newly_created_audit_open_link
util.waitForElementToBePresent(newly_created_audit_open_link)
self.assertTrue(util.isElementPresent(newly_created_audit_open_link), "do not see the newly created audit open link " )
util.clickOn(newly_created_audit_open_link)
util.switch_to_active_element()
#expand objetiive 1 to verify the uploaded file
do.expandCollapseRequest(grcobject.objective_title[0])
evidence_folder_link = element.audit_pb_request_response_evidence_folder_link.replace("TITLE",grcobject.objective_title[0] )
util.waitForElementToBePresent(evidence_folder_link)
self.assertTrue(util.isElementPresent(evidence_folder_link), "do not see the evidene folder link " )
do.expandCollapseRequest(grcobject.objective_title[0])
time.sleep(2)
#10. Click on Objective 2 for Auto Test of Audit to open 2nd tier info (Interview)
print "click on Objective 2 for Auto test of Audit to open 2nd tier info"
do.expandCollapseRequest(grcobject.objective_title[1])
objective2_select = element.audit_pbc_request_type_select.replace("TITLE",grcobject.objective_title[1] )
util.waitForElementToBePresent(objective2_select)
util.selectFromDropdownUntilSelected(objective2_select, "Interview") # didn't work the first time
print "Hover over +PBC Request then click on Create PBC Response to launch modal"
add_pbc_response_link_within_the_objective = element.audit_pbc_request.replace("TITLE",grcobject.objective_title[1] )+element.section_add_link
create_pbc_response_link_within_the_objective = element.audit_pbc_request.replace("TITLE",grcobject.objective_title[1] )+element.section_create_link
util.waitForElementToBePresent(add_pbc_response_link_within_the_objective)
util.scrollIntoView(add_pbc_response_link_within_the_objective)
util.hoverOverAndWaitFor(add_pbc_response_link_within_the_objective,create_pbc_response_link_within_the_objective)
util.clickOn(add_pbc_response_link_within_the_objective)
util.clickOn(create_pbc_response_link_within_the_objective)
#Description field : "Response foir Interview Type", Save
print "creating new interview response"
do.NewResponseCreate("Response for Interview Type")
#Click on Response for Interview Type header to reveal response 2nd tier info
#click +Object to open Map Object Selector. Change top filter to Org Group if neccessary (should not be). Choose Reciprocity Dev Team and hit Map button. (use search to find this if easier to implement)
#Confirm Reciprocity Dev Team is mapped to the Response and appears in the area provided
#after creating a new response, the whole response section gets expanded automatically now,
#just need to wait for all elements to load (+Object, +Person, + Meeting)
add_object_link = element.audit_pbc_request_response_add_object_link_within_response.replace("TITLE",grcobject.objective_title[1] )
add_person_link = element.audit_pbc_request_response_add_person_within_response.replace("TITLE",grcobject.objective_title[1] )
add_meeting_link = element.audit_pbc_request_response_add_meeting.replace("TITLE",grcobject.objective_title[1] )
util.waitForElementToBePresent(add_object_link)
self.assertTrue(util.isElementPresent(add_object_link), "do not see the open close button for the response")
util.waitForElementToBePresent(add_person_link)
self.assertTrue(util.isElementPresent(add_person_link), "do not see the + Person link")
util.waitForElementToBePresent(add_meeting_link)
self.assertTrue(util.isElementPresent(add_meeting_link), "do not see the + Meeting link")
#click +Object to open Map Object Selector.
util.clickOn(add_object_link)
#Change top filter to Org Group.
util.waitForElementToBePresent(element.mapping_modal_window)
self.assertTrue(util.isElementPresent(element.mapping_modal_window), "do not see the modal window")
util.waitForElementToBePresent(element.mapping_modal_top_filter_selector_dropdown)