示例#1
0
 def create_admin_owner(self, first_name, last_name, email):
     page4 = BasePage(self)
     page4.wait_for_ele_visibility(*self.locator_dictionary['first_name'])
     del page4
     self.find_element(
         *self.locator_dictionary['first_name']).send_keys(first_name)
     self.find_element(
         *self.locator_dictionary['last_name']).send_keys(last_name)
     self.find_element(*self.locator_dictionary['email']).send_keys(email)
     select_role = self.find_element(
         *self.locator_dictionary['select_role'])
     select = Select(select_role)
     select.select_by_value("1")
     select_permission = self.find_element(
         *self.locator_dictionary['select_permission'])
     select = Select(select_permission)
     select.select_by_value("1")
     del select
     self.find_element(
         *self.locator_dictionary['submit_admin_details']).click()
     wait = WebDriverWait(self.browser, 10)
     wait.until(
         EC.invisibility_of_element_located(
             (self.locator_dictionary['loader'])))
     del wait
示例#2
0
    def __init__(self, context):
        from steps.group_class_division import orgs
        self.API_OrgList = API_URL + "/org?status=1&search=" + orgs['org1']
        self.API_OrgList1 = API_URL + "/org?status=1&search=" + orgs['org3']
        self.API_OrgList2 = API_URL + "/org?status=1&search=" + orgs['org4']
        self.EditEmployeeEmail = orgs['EditEmployeeEmail']
        self.EditEmployeeEmail1 = orgs['EditEmployeeEmail1']
        self.AdminEmail = orgs['AdminEmail']
        self.OrgAdminEmail = orgs['OrgAdminEmail']
        self.OrgAdminEmail1 = orgs['OrgAdminEmail1']
        self.EmployeeEmail = orgs['EmployeeEmail']
        self.EmployeeEmail1 = orgs['EmployeeEmail1']
        self.BenemaxAdminEmail = orgs['BenemaxAdminEmail']
        self.BenemaxAdminEmail1 = orgs['BenemaxAdminEmail1']
        self.AdminFname = orgs['AdminFname']
        self.AdminFname1 = orgs['AdminFname1']
        self.org5 = API_URL + "/org?status=1&search=" + orgs['org5']
        self.org6 = API_URL + "/org?status=1&search=" + orgs['org6']
        self.org7 = orgs['org7']
        self.BenemaxAdminEmail2 = orgs['BenemaxAdminEmail2']
        self.AdminFname2 = orgs['AdminFname2']
        self.BenemaxAdminEmail3 = orgs['BenemaxAdminEmail3']
        self.AdminFname3 = orgs['AdminFname3']
        self.AdminFname4 = orgs['AdminFname4']
        self.benemaxadmin_email = orgs['benemaxadmin_email']
        self.AdminFname5 = orgs['AdminFname5']
        self.benemaxadmin_email1 = orgs['benemaxadmin_email1']

        BasePage.__init__(self, context.browser)
示例#3
0
 def verify_created_admin(self, created_admin_fname):
     page4 = BasePage(self)
     page4.wait_for_ele_visibility(
         *self.locator_dictionary['verify_created_admin'])
     del page4
     link_1 = self.find_element(
         *self.locator_dictionary['verify_created_admin'])
     link_2 = link_1.text
     print(link_2)
     assert link_2 == created_admin_fname, "Visible Text is not as expected" \
                              " Actual: {}, Expected: {}".format(link_2, created_admin_fname)
     del link_1
     del link_2
示例#4
0
 def verify_admin_modal(self):
     page4 = BasePage(self)
     page4.wait_for_ele_visibility(
         *self.locator_dictionary['verify_admin_modal'])
     del page4
     link_1 = self.find_element(
         *self.locator_dictionary['verify_admin_modal'])
     link_2 = link_1.text
     link_3 = "Create an Administrator"
     assert link_2 == link_3, "Visible Text is not as expected" \
                                                " Actual: {}, Expected: {}".format(link_2, link_3)
     del link_1
     del link_2
     del link_3
示例#5
0
 def verify_created_admin_pending_state(self):
     page4 = BasePage(self)
     page4.wait_for_ele_visibility(
         *self.locator_dictionary['verify_created_admin_inactive'])
     del page4
     link_1 = self.find_element(
         *self.locator_dictionary['verify_created_admin_inactive'])
     link_2 = link_1.text
     print(link_2)
     link_3 = "Pending"
     assert link_2 == link_3, "Visible Text is not as expected" \
                              " Actual: {}, Expected: {}".format(link_2, link_3)
     del link_1
     del link_2
     del link_3
示例#6
0
 def verify_admin_view_not_displayed(self):
     page4 = BasePage(self)
     page4.wait_for_ele_visibility(
         *self.locator_dictionary['create_administrator'])
     del page4
     link_1 = self.find_element(
         *self.locator_dictionary['create_administrator'])
     link_2 = link_1.text
     print(link_2)
     link_3 = "Create Administrator"
     assert link_2 != link_3, "Admin tab visible to admin with edit permission" \
                              " Actual: {}, Expected: {}".format(link_2, link_3)
     del link_1
     del link_2
     del link_3
示例#7
0
 def click_create_administrator(self):
     wait = WebDriverWait(self.browser, 10)
     wait.until(
         EC.invisibility_of_element_located(
             (self.locator_dictionary['loader'])))
     del wait
     page4 = BasePage(self)
     page4.wait_for_ele_visibility(*self.locator_dictionary['Admin_tab'])
     del page4
     self.find_element(*self.locator_dictionary['Admin_tab']).click()
     time.sleep(1)
     self.find_element(
         *self.locator_dictionary['create_administrator']).click()
     wait = WebDriverWait(self.browser, 15)
     wait.until(
         EC.invisibility_of_element_located(
             (self.locator_dictionary['loader'])))
     del wait
示例#8
0
 def __init__(self, context):
     BasePage.__init__(self, context.browser)
示例#9
0
 def __init__(self, context):
     BasePage.__init__(self, context.browser, base_url='')