class CRPOLogin: def __init__(self, driver, index): self.driver = driver self.LoginPage = Login(self.driver) self.title = appTitle.Title(self.driver) """ ----------------- EXCEL READ AND TO ASSIGN VALUES TO RESPECTIVE INIT VARIABLES ------>>>> """ login_excel = excelRead.ExcelRead() login_excel.read(inputFile.INPUT_PATH['login_excel'], index=index) xl = login_excel.excel_dict self.xl_title = xl['c_title'][0] self.xl_tenant = xl['c_tenant'][0] self.xl_login = xl['c_login_name'][0] self.xl_user = xl['c_user_name'][0] self.xl_password = xl['c_password'][0] self.xl_logged_in_title = xl['c_logged_in_title'][0] def crpo_login(self): assert self.title.tab_title(self.xl_title) == self.xl_title self.LoginPage.tenant(self.xl_tenant) self.LoginPage.next_button() self.LoginPage.login_name(self.xl_login) self.LoginPage.password(self.xl_password) self.LoginPage.login_button() self.LoginPage.login_account_name_verification(self.xl_user) print(f'{self.xl_user} logged in successfully') self.title.tab_title(self.xl_title)
class CrpoInt1Login: def __init__(self, driver, index): self.driver = driver self.login = Login(self.driver) self.search = AdvanceSearchPage.Search(self.driver) self.getby = EventGetByNamePage.EventGetByName(self.driver) """ ----------------- EXCEL READ AND TO ASSIGN VALUES TO RESPECTIVE INIT VARIABLES ------>>>> """ int_excel = excelRead.ExcelRead() int_excel.read(inputFile.INPUT_PATH['interview_lobby'], index=index) xl = int_excel.excel_dict self.xl_account_name = xl['account_name'][0] self.xl_int1 = xl['int1'][0] self.xl_int1_name = xl['int1_name'][0] self.int1_collection = [] def interviewer1_login(self): self.int1_collection = [] __list = [self.login.login_account_click(self.xl_account_name), self.login.login_out(), self.login.click_here_to_login(), self.login.login_name(self.xl_int1), self.login.password(self.xl_int1), self.login.login_button(), self.login.login_account_name_verification(self.xl_int1_name) ] for func in __list: if func: self.int1_collection.append(func) else: self.int1_collection.append(func)
class CrpoAdminLogin: def __init__(self, driver, index, version): self.driver = driver self.login = Login(self.driver) self.search = AdvanceSearchPage.Search(self.driver) self.getby = EventGetByNamePage.EventGetByName(self.driver) self.menu = Menu(self.driver) """ ----------------- EXCEL READ AND TO ASSIGN VALUES TO RESPECTIVE INIT VARIABLES ------>>>> """ excel = excelRead.ExcelRead() excel.read(inputFile.INPUT_PATH['interview_lobby'], index=index) xl = excel.excel_dict self.xl_account_name = xl['account_name'][0] self.xl_int1_name = xl['int1_name'][0] self.xl_event = xl['event_name'][0].format(version) self.xl_menu = xl['menu'][0] self.xl_title = xl['tab_title'][0] login_excel = excelRead.ExcelRead() login_excel.read(inputFile.INPUT_PATH['login_excel'], index=index) xl = login_excel.excel_dict self.xl_name = xl['c_login_name'][0] self.xl_pwd = xl['c_password'][0] self.admin_collection = [] def admin_login(self): self.admin_collection = [] __list = [ self.login.login_account_click(self.xl_int1_name), self.login.login_out(), self.login.click_here_to_login(), self.login.login_name(self.xl_name), self.login.password(self.xl_pwd), self.login.login_button(), self.login.login_account_name_verification(self.xl_account_name), self.menu.event_tab(self.xl_menu, self.xl_title), self.search.advance_search(), self.search.name_field(self.xl_event), self.search.search_button(), self.getby.event_name_click(), self.getby.event_name_validation(self.xl_event), ] for func in __list: if func: self.admin_collection.append(func) else: self.admin_collection.append(func)
class CrpoInt2Login: def __init__(self, driver, index, version): self.driver = driver self.login = Login(self.driver) self.search = AdvanceSearchPage.Search(self.driver) self.getby = EventGetByNamePage.EventGetByName(self.driver) self.event_action = EventActionsPage.Actions(self.driver) """ ----------------- EXCEL READ AND TO ASSIGN VALUES TO RESPECTIVE INIT VARIABLES ------>>>> """ int_excel = excelRead.ExcelRead() int_excel.read(inputFile.INPUT_PATH['interview_lobby'], index=index) xl = int_excel.excel_dict self.xl_int1_name = xl['int1_name'][0] self.xl_int2 = xl['int2'][0] self.xl_int2_name = xl['int2_name'][0] self.xl_event = xl['event_name'][0].format(version) self.int2_collection = [] def interviewer2_login(self): self.int2_collection = [] __list = [self.login.login_account_click(self.xl_int1_name), self.login.login_out(), self.login.click_here_to_login(), self.login.login_name(self.xl_int2), self.login.password(self.xl_int2), self.login.login_button(), self.login.login_account_name_verification(self.xl_int2_name), self.search.advance_search(), self.search.name_field(self.xl_event), self.search.search_button(), self.getby.event_name_click(), self.getby.event_name_validation(self.xl_event), self.event_action.event_actions_click(), self.event_action.event_interviews() ] for func in __list: if func: self.int2_collection.append(func) else: self.int2_collection.append(func)
class CrpoAdminLogin: def __init__(self, driver, index, version): self.driver = driver self.login = Login(self.driver) self.search = AdvanceSearchPage.Search(self.driver) self.getby = EventGetByNamePage.EventGetByName(self.driver) self.menu = Menu(self.driver) self.event_action = EventActionsPage.Actions(self.driver) self.bucket = BucketSelectionPage(self.driver) self.applicant_grid = EventApplicant(self.driver) self.applicant_action = EventApplicantActions(self.driver) self.unlock = UnlockFeedback(self.driver) """ ----------------- EXCEL READ AND TO ASSIGN VALUES TO RESPECTIVE INIT VARIABLES ------>>>> """ excel = excelRead.ExcelRead() excel.read(inputFile.INPUT_PATH['interview_lobby'], index=index) xl = excel.excel_dict self.xl_account_name = xl['account_name'][0] self.xl_int2_name = xl['int2_name'][0] self.xl_event = xl['event_name'][0].format(version) self.xl_menu = xl['menu'][0] self.xl_title = xl['tab_title'][0] login_excel = excelRead.ExcelRead() login_excel.read(inputFile.INPUT_PATH['login_excel'], index=index) xl = login_excel.excel_dict self.xl_name = xl['c_login_name'][0] self.xl_pwd = xl['c_password'][0] unlock_excel = excelRead.ExcelRead() unlock_excel.read(inputFile.INPUT_PATH['feedback'], index=index) xl = unlock_excel.excel_dict self.xl_bucket = xl['completed_bucket'][0] self.xl_unlock_comment = xl['unlock_comment'][0] self.xl_unlock_message = xl['unlock_message'][0] self.admin_collection = [] self.unlock_collection = [] def admin_login(self): self.admin_collection = [] __list = [ self.login.login_account_click(self.xl_int2_name), self.login.login_out(), self.login.click_here_to_login(), self.login.login_name(self.xl_name), self.login.password(self.xl_pwd), self.login.login_button(), self.login.login_account_name_verification(self.xl_account_name), self.menu.event_tab(self.xl_menu, self.xl_title), self.search.advance_search(), self.search.name_field(self.xl_event), self.search.search_button(), self.getby.event_name_click(), self.getby.event_name_validation(self.xl_event), ] for func in __list: if func: self.admin_collection.append(func) else: self.admin_collection.append(func) def admin_unlock(self): self.unlock_collection = [] __list = [ self.event_action.event_actions_click(), self.event_action.event_interviews(), self.bucket.bucket_select(self.xl_bucket), self.applicant_grid.select_applicant(), self.applicant_action.unlock_feedback_action(), self.unlock.select_all_interviewers(), self.unlock.unlock_button(), self.unlock.unlock_request_comment(self.xl_unlock_comment), self.unlock.ok_button(), self.unlock.unlock_status_notifier(self.xl_unlock_message), self.unlock.unlock_status_notifier_dismiss(), self.unlock.close_button() ] for func in __list: if func: self.unlock_collection.append(func) else: self.unlock_collection.append(func)