Ejemplo n.º 1
0
from framework.browser_engine import BrowserEngine
from pageobjects.catalog_page import *
from pageobjects.workforce_management_page import *
from unit.excel import ExcelUtils
from unit.login import login
from logs.logger import Logger

logger = Logger(logger="WFMSearch").getlog()
excel_utils1 = ExcelUtils("workforceManagement_info.xlsx", "Sheet1")
excel_utils2 = ExcelUtils("workforceManagement_info.xlsx", "Sheet2")
excel_utils3 = ExcelUtils("workforceManagement_info.xlsx", "Sheet3")
excel_utils4 = ExcelUtils("workforceManagement_info.xlsx", "Sheet4")
excel_utils5 = ExcelUtils("workforceManagement_info.xlsx", "Sheet5")

select_group = excel_utils1.dict_data()
select_shift = excel_utils2.dict_data()
copy_others = excel_utils3.dict_data()
apply_others = excel_utils4.dict_data()
clear_shift = excel_utils5.dict_data()


# 排班管理
@ddt.ddt
class WorkforceManagement(unittest.TestCase):
    def setUp(self):
        self.module_name = '排班管理'
        browser = BrowserEngine(self)
        self.driver = browser.open_browser(self)  # 读取浏览器类型
        driver = self.driver
        # 调用登录函数,默认username='******',password='******'
Ejemplo n.º 2
0
# -*- coding: utf-8 -*-
import unittest
from time import sleep

import ddt

from framework.browser_engine import BrowserEngine
from pageobjects.catalog_page import DirectoryList
from pageobjects.examine_custom_page import *
from unit.excel import ExcelUtils
from unit.login import login

from unit.operation_fun import OperationMethod

excel_utils = ExcelUtils("examine_custom_info.xlsx", "Sheet1")
xz = excel_utils.dict_data()
excel_utils = ExcelUtils("examine_custom_info.xlsx", "Sheet2")
xg = excel_utils.dict_data()
excel_utils = ExcelUtils("examine_custom_info.xlsx", "Sheet3")
sc = excel_utils.dict_data()


# 审查自定义项
@ddt.ddt
class ExamineCustom(unittest.TestCase):
    def setUp(self):
        browser = BrowserEngine(self)
        self.driver = browser.open_browser(self)  # 读取浏览器类型
        sleep(1)
        driver = self.driver
        directory = DirectoryList(driver)
Ejemplo n.º 3
0
from time import sleep

import ddt
from parameterized import parameterized
from selenium.webdriver.common.action_chains import ActionChains

# 新增
# from Test_data.test_data import test01_alter_correct_info
from framework.browser_engine import BrowserEngine
from pageobjects.catalog_page import *
from pageobjects.staff_policy_allocation_page import *
from unit.excel import ExcelUtils
from unit.login import login

excel_utils = ExcelUtils("staff_policy_allocation_info.xlsx", "result1")
test_alter_correct_info = excel_utils.dict_data()


@ddt.ddt
class StaffPolicyAllocation(unittest.TestCase):
    def setUp(self):
        self.module_name = '员工政策分配'
        browser = BrowserEngine(self)
        self.driver = browser.open_browser(self)  # 读取浏览器类型
        driver = self.driver
        directory = DirectoryList(driver)

        # 调用登录函数,默认username='******',password='******'
        self.lg = login(driver)
        sleep(0.5)
        # print('当前页url是:',url)
Ejemplo n.º 4
0
# -*- coding: utf-8 -*-
import unittest
from time import sleep
import os

import ddt

from framework.browser_engine import BrowserEngine
from pageobjects.basic_setup_page import *
from pageobjects.catalog_page import DirectoryList
from unit.excel import ExcelUtils
from unit.login import login
from unit.operation_fun import OperationMethod

excel_utils = ExcelUtils("basic_set_info.xlsx", "Sheet1")
jb = excel_utils.dict_data()
excel_utils = ExcelUtils("basic_set_info.xlsx", "Sheet2")
tp = excel_utils.dict_data()
excel_utils = ExcelUtils("basic_set_info.xlsx", "Sheet3")
qt = excel_utils.dict_data()


# 基本设置
@ddt.ddt
class BasicSetup(unittest.TestCase):
    def setUp(self):
        browser = BrowserEngine(self)
        self.driver = browser.open_browser(self)  # 读取浏览器类型
        driver = self.driver
        # 调用登录函数,默认username='******',password='******'
        self.lg = login(driver)
import unittest
from time import sleep

import ddt

from framework.browser_engine import BrowserEngine
from pageobjects.catalog_page import DirectoryList
from pageobjects.attendance_period_management_page import *
from unit.excel import ExcelUtils
from unit.login import login
from unit.operation_fun import OperationMethod
from logs.logger import Logger
logger = Logger(logger="WFMSearch").getlog()

excel_utils = ExcelUtils("attendance_period_management_info.xlsx", "Sheet1")
xg = excel_utils.dict_data()
excel_utils = ExcelUtils("attendance_period_management_info.xlsx", "Sheet2")
gz = excel_utils.dict_data()


# 考勤期段管理
@ddt.ddt
class AttendancePeriodManagement(unittest.TestCase):
    def setUp(self):
        browser = BrowserEngine(self)
        self.driver = browser.open_browser(self)  # 读取浏览器类型
        driver = self.driver
        # 调用登录函数,默认username='******',password='******'
        self.lg = login(driver)
        directory = DirectoryList(driver)
        # 考勤设置-考勤体系-新建考勤体系
Ejemplo n.º 6
0
# -*- coding: utf-8 -*-
import unittest

import ddt

from framework.browser_engine import BrowserEngine
from pageobjects.my_flow_page import *
from pageobjects.catalog_page import DirectoryList
from unit.date_formatting import FormatTime
from unit.excel import ExcelUtils
from unit.login import login
from unit.sqlserver import DataBase

excel_utils = ExcelUtils("my_flow_info.xlsx", "Sheet1")
ly = excel_utils.dict_data()
excel_utils = ExcelUtils("my_flow_info.xlsx", "Sheet2")
lz = excel_utils.dict_data()
excel_utils = ExcelUtils("my_flow_info.xlsx", "Sheet3")
xj = excel_utils.dict_data()
excel_utils = ExcelUtils("my_flow_info.xlsx", "Sheet4")
dg = excel_utils.dict_data()
excel_utils = ExcelUtils("my_flow_info.xlsx", "Sheet5")
bdk = excel_utils.dict_data()
excel_utils = ExcelUtils("my_flow_info.xlsx", "Sheet6")
xcd = excel_utils.dict_data()
excel_utils = ExcelUtils("my_flow_info.xlsx", "Sheet7")
jb = excel_utils.dict_data()


# 录用申请
@ddt.ddt
Ejemplo n.º 7
0
# -*- coding: utf-8 -*-
import unittest
from time import sleep

import ddt

from framework.browser_engine import BrowserEngine
from pageobjects.attendance_site_page import *
from pageobjects.catalog_page import DirectoryList
from unit.excel import ExcelUtils
from unit.login import login
from unit.operation_fun import OperationMethod

excel_utils = ExcelUtils("attendance_site_info.xlsx", "Sheet1")
sz = excel_utils.dict_data()
excel_utils = ExcelUtils("attendance_site_info.xlsx", "Sheet2")
qx = excel_utils.dict_data()


# 考勤地点
@ddt.ddt
class AttendanceSite(unittest.TestCase):
    def setUp(self):
        browser = BrowserEngine(self)
        self.driver = browser.open_browser(self)  # 读取浏览器类型
        driver = self.driver
        # 调用登录函数,默认username='******',password='******'
        self.lg = login(driver)
        directory = DirectoryList(driver)

        # 考勤设置-考勤地点