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


Python Helpers.mapPerson方法代码示例

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


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

示例1: testProgramAuditInterviewRequest

# 需要导入模块: from helperRecip.Helpers import Helpers [as 别名]
# 或者: from helperRecip.Helpers.Helpers import mapPerson [as 别名]

#.........这里部分代码省略.........
        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)
        self.assertTrue(util.isElementPresent(element.mapping_modal_top_filter_selector_dropdown), "do not see the modal window")
        util.selectFromDropdownByValue(element.mapping_modal_top_filter_selector_dropdown, "OrgGroup")
        
        #Choose Reciprocity Dev Team and hit Map button. (use search to find this if easier to implement)
        util.waitForElementToBePresent(element.mapping_modal_top_filter_selector_dropdown_reciprocity_dev_team_option)
        self.assertTrue(util.isElementPresent(element.mapping_modal_top_filter_selector_dropdown_reciprocity_dev_team_option), "do not see the open close button for the response")
        util.clickOn(element.mapping_modal_top_filter_selector_dropdown_reciprocity_dev_team_option)
        util.waitForElementToBePresent(element.mapping_modal_window_map_button)
        self.assertTrue(util.isElementPresent(element.mapping_modal_window_map_button), "no Map button")
        util.clickOn(element.mapping_modal_window_map_button)
        util.waitForElementNotToBePresent(element.mapping_modal_window)
        
         #Confirm Reciprocity Dev Team is mapped to the Response and appears in the area provided
        util.waitForElementToBePresent(element.audit_pbc_request_response_mapped_org_group_object_withrecipprocity_dev_team)
        self.assertTrue(util.isElementPresent(element.audit_pbc_request_response_mapped_org_group_object_withrecipprocity_dev_team), "no Mapped org group button")
        
        
        #click on +Person link to launch Map People modal
        print "click on +Person link to launch Map People modal"
        #add_person_link = element.audit_pbc_request_response_add_person_within_response.replace("TITLE",grcobject.objective_title[1] )
        util.waitForElementToBePresent(add_person_link)
        self.assertTrue(util.isElementPresent(add_person_link), "do not see the + Person link")
        util.clickOn(add_person_link)
        
        #search for "silas"
        print "searching and mapping another participant"
        person_email=do.mapPerson("silas")
        
        #confirm silas has been added to Participant area
        print "confirming another participant has been mapped"
        participant_email = element.audit_pbc_request_response_participant_email.replace("EMAIL",person_email)
        util.waitForElementToBePresent(participant_email)
        self.assertTrue(util.isElementPresent(participant_email), "do not see the Person Mapped email")
        
        #click on +Meetings in Meetings area
        print "click on +Meetings in Meetings area"
        
        add_meeting_link = element.audit_pbc_request_response_add_meeting.replace("TITLE",grcobject.objective_title[1] )
        print "add meeting link is " +add_meeting_link
        util.waitForElementToBePresent(add_meeting_link)
        self.assertTrue(util.isElementPresent(add_meeting_link), "do not see +Meeting link")
        create_meeting_link = element.audit_pbc_request_response_create_meeting.replace("TITLE",grcobject.objective_title[1] )
        util.scrollIntoView(add_meeting_link)
        util.scrollIntoView(add_meeting_link)
        util.move_mouse_over(add_meeting_link)
        util.scrollIntoView(add_meeting_link)
        util.hoverOver(add_meeting_link)
        util.clickOn(create_meeting_link)
        
        meeting_date = (date.today())+ datetime.timedelta(days=14)
        meeting_date_into_format = do.convertDateIntoFormat(meeting_date)
        
        #Enter Title:  Auto Test of Audit - Interview Response - Scheduling a meeting, Choose date : current date + 2 weeks, Set start time to 12pm, Set end time to 1pm, Confirm particpants are silas and testrecip
        do.scheduleMeeting("Auto Test of Audit - Interview Response - Scheduling a meeting-"+strftime("%Y_%m_%d__%H_%M_%S"),meeting_date_into_format, "03:00 PM", "04:00 PM")
        #do.closeOtherWindows()
        #util.switch_to_active_element()
        util.focus()
        util.waitForElementToBePresent(element.meeting_expnad_link)
        util.clickOn(element.meeting_expnad_link)
        
        do.verifyMeetingData(meeting_date_into_format, "03:00 PM", "04:00 PM")
开发者ID:dtzinov,项目名称:ggrc-test,代码行数:104,代码来源:TestProgramAuditInterviewRequest.py

示例2: testProgramAudit

# 需要导入模块: from helperRecip.Helpers import Helpers [as 别名]
# 或者: from helperRecip.Helpers.Helpers import mapPerson [as 别名]

#.........这里部分代码省略.........
        #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)
        self.assertTrue(util.isElementPresent(element.mapping_modal_top_filter_selector_dropdown), "do not see the modal window")
        util.selectFromDropdownByValue(element.mapping_modal_top_filter_selector_dropdown, "OrgGroup")
        
        #Choose Reciprocity Dev Team and hit Map button. (use search to find this if easier to implement)
        util.waitForElementToBePresent(element.mapping_modal_top_filter_selector_dropdown_reciprocity_dev_team_option)
        self.assertTrue(util.isElementPresent(element.mapping_modal_top_filter_selector_dropdown_reciprocity_dev_team_option), "do not see the open close button for the response")
        util.clickOn(element.mapping_modal_top_filter_selector_dropdown_reciprocity_dev_team_option)
        util.waitForElementToBePresent(element.mapping_modal_window_map_button)
        self.assertTrue(util.isElementPresent(element.mapping_modal_window_map_button), "no Map button")
        util.clickOn(element.mapping_modal_window_map_button)
        util.waitForElementNotToBePresent(element.mapping_modal_window)
        
         #Confirm Reciprocity Dev Team is mapped to the Response and appears in the area provided
        util.waitForElementToBePresent(element.audit_pbc_request_response_mapped_org_group_object_withrecipprocity_dev_team)
        self.assertTrue(util.isElementPresent(element.audit_pbc_request_response_mapped_org_group_object_withrecipprocity_dev_team), "no Mapped org group button")
        
        
        #click on +Person link to launch Map People modal
        print "click on +Person link to launch Map People modal"
        #add_person_link = element.audit_pbc_request_response_add_person_within_response.replace("TITLE",grcobject.objective_title[1] )
        util.waitForElementToBePresent(add_person_link)
        self.assertTrue(util.isElementPresent(add_person_link), "do not see the + Person link")
        util.clickOn(add_person_link)
        
        #search for "silas"
        print "searching and mapping another participant"
        person_email=do.mapPerson("silas")
        
        #confirm silas has been added to Participant area
        print "confirming another participant has been mapped"
        participant_email = element.audit_pbc_request_response_participant_email.replace("EMAIL",person_email)
        util.waitForElementToBePresent(participant_email)
        self.assertTrue(util.isElementPresent(participant_email), "do not see the Person Mapped email")
        
        #click on +Meetings in Meetings area
        print "click on +Meetings in Meetings area"
        
        add_meeting_link = element.audit_pbc_request_response_add_meeting.replace("TITLE",grcobject.objective_title[1] )
        print "add meeting link is " +add_meeting_link
        util.waitForElementToBePresent(add_meeting_link)
        self.assertTrue(util.isElementPresent(add_meeting_link), "do not see +Meeting link")
        create_meeting_link = element.audit_pbc_request_response_create_meeting.replace("TITLE",grcobject.objective_title[1] )
        util.scrollIntoView(add_meeting_link)
        util.scrollIntoView(add_meeting_link)
        util.move_mouse_over(add_meeting_link)
        util.scrollIntoView(add_meeting_link)
        util.hoverOver(add_meeting_link)
        util.clickOn(create_meeting_link)
        
        meeting_date = (date.today())+ datetime.timedelta(days=14)
        meeting_date_into_format = do.convertDateIntoFormat(meeting_date)
        
        #Enter Title:  Auto Test of Audit - Interview Response - Scheduling a meeting, Choose date : current date + 2 weeks, Set start time to 12pm, Set end time to 1pm, Confirm particpants are silas and testrecip
        do.scheduleMeeting("Auto Test of Audit - Interview Response - Scheduling a meeting-"+strftime("%Y_%m_%d__%H_%M_%S"),meeting_date_into_format, "03:00 PM", "04:00 PM")
        #do.closeOtherWindows()
        #util.switch_to_active_element()
        util.focus()
        util.waitForElementToBePresent(element.meeting_expnad_link)
        util.clickOn(element.meeting_expnad_link)
开发者ID:dtzinov,项目名称:ggrc-test,代码行数:70,代码来源:TestProgramAudit.py


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