Ejemplo n.º 1
0
    def test_b_add_Team_2_and_admin_league_admin(self):
        driver = self.driver

        Team = TeamPage(driver)
        Team1 = LeaguePage(driver)
        Team11 = UserPage(driver)
        Team.click_team_tab()
        time.sleep(2)
        Team1.click_add_new_button()
        time.sleep(1)
        driver.refresh()
        time.sleep(2)
        Team11.select_league(self.league_name)
        Team.enter_team_name(self.Team_2_name)
        Team.enter_team_location(self.Team_2_location)
        Team.select_founded_year(self.founded_year_index)
        Team.enter_sub_domain(self.sub_domain_2)
        Team.click_add_new_team_admin_checkbox()
        time.sleep(2)
        Team.enter_new_team_admin_first_name(self.team_2_team_admin_first_name)
        Team.enter_new_team_admin_last_name(self.team_2_team_admin_last_name)
        Team.enter_new_team_admin_email_xpath(self.team_2_team_admin_email)
        Team.enter_new_team_admin_user_name(self.team_2_team_admin_user_name)
        Team.click_add_new_league_admin_checkbox()
        time.sleep(2)
        Team.enter_new_league_admin_first_name(
            self.team_2_league_admin_first_name)
        Team.enter_new_league_admin_last_name(
            self.team_2_league_admin_last_name)
        Team.enter_new_league_admin_email_xpath(self.team_2_league_admin_email)
        Team.enter_new_league_admin_user_name(
            self.team_2_league_admin_user_name)
        Team1.click_add_submit_button()
        time.sleep(2)
    def test_i_add_player_1_2_3_and_select_team_1(self):
        driver = self.driver
        Player1 = LeaguePage(driver)
        login = Loginpage(self.driver)
        player = UserPage(driver)
        player.click_user_tab()
        time.sleep(2)
        Player1.click_add_new_button()
        time.sleep(2)
        player.enter_user_first_name(self.Team_1_player_1_first_name)
        player.enter_user_last_name(self.Team_1_player_1_last_name)
        player.enter_user_email_xpath(self.Team_1_player_1_email)
        player.enter_user_username(self.Team_1_player_1_user_name)
        player.select_user_type(self.user_types_player)
        time.sleep(4)
        player.select_team(self.Team_1_name)
        time.sleep(2)
        Player1.click_add_submit_button()
        time.sleep(2)

        Player1.click_add_new_button()
        time.sleep(2)
        player.enter_user_first_name(self.Team_1_player_2_first_name)
        player.enter_user_last_name(self.Team_1_player_2_last_name)
        player.enter_user_email_xpath(self.Team_1_player_2_email)
        player.enter_user_username(self.Team_1_player_2_user_name)
        player.select_user_type(self.user_types_player)
        time.sleep(4)
        player.select_team(self.Team_1_name)
        time.sleep(2)
        Player1.click_add_submit_button()
        time.sleep(2)

        Player1.click_add_new_button()
        time.sleep(2)
        player.enter_user_first_name(self.Team_1_player_3_first_name)
        player.enter_user_last_name(self.Team_1_player_3_last_name)
        player.enter_user_email_xpath(self.Team_1_player_3_email)
        player.enter_user_username(self.Team_1_player_3_user_name)
        player.select_user_type(self.user_types_player)
        time.sleep(4)
        player.select_team(self.Team_1_name)
        time.sleep(2)
        Player1.click_add_submit_button()
        time.sleep(2)


# Logout
        time.sleep(5)
        login.click_profile_icon()
        login.click_profile_icon()
        time.sleep(1)
        login.click_logout()
        time.sleep(2)
        driver.delete_all_cookies()
        driver.refresh()
        time.sleep(2)
    def test_e_add_analyst_1_and_select_team_1(self):
        driver = self.driver

        Analyst1 = LeaguePage(driver)
        Analyst = UserPage(driver)
        Analyst.click_user_tab()
        time.sleep(2)
        Analyst1.click_add_new_button()
        time.sleep(2)
        Analyst.enter_user_first_name(self.Team_1_analyst_first_name)
        Analyst.enter_user_last_name(self.Team_1_analyst_last_name)
        Analyst.enter_user_email_xpath(self.Team_1_analyst_email)
        Analyst.enter_user_username(self.Team_1_analyst_user_name)
        Analyst.select_user_type(self.user_types_analyst)
        time.sleep(4)
        Analyst.select_team(self.Team_1_name)
        time.sleep(2)
        Analyst1.click_add_submit_button()
        time.sleep(2)
 def test_h_add_scout_and_select_team_1(self):
     driver = self.driver
     Coach1 = LeaguePage(driver)
     Coach = UserPage(driver)
     Coach.click_user_tab()
     time.sleep(2)
     Coach1.click_add_new_button()
     time.sleep(2)
     Coach.enter_user_first_name(self.Team_1_scout_first_name)
     Coach.enter_user_last_name(self.Team_1_scout_last_name)
     Coach.enter_user_email_xpath(self.Team_1_scout_email)
     Coach.enter_user_username(self.Team_1_scout_user_name)
     Coach.select_user_type(self.user_types_scout)
     time.sleep(4)
     Coach.select_team(self.Team_1_name)
     time.sleep(2)
     Coach1.click_add_submit_button()
     time.sleep(2)
Ejemplo n.º 5
0
    def test_g_add_player_3_and_select_team_1(self):
        driver = self.driver

        Player3 = LeaguePage(driver)
        player = UserPage(driver)
        player.click_user_tab()
        time.sleep(2)
        Player3.click_add_new_button()
        time.sleep(2)
        player.enter_user_first_name(self.Team_1_player_3_first_name)
        player.enter_user_last_name(self.Team_1_player_3_last_name)
        player.enter_user_email_xpath(self.Team_1_player_3_email)
        player.enter_user_username(self.Team_1_player_3_user_name)
        player.select_user_type(self.user_types_player)
        time.sleep(4)
        player.select_team(self.Team_1_name)
        time.sleep(2)
        Player3.click_add_submit_button()
        time.sleep(2)