Ejemplo n.º 1
0
    def __init__(self):

        # Log
        self.__logger = OrcLog("view.driver.web.service.window_def")

        self.__resource_widget_def = OrcHttpNewResource("WidgetDef")
        self.__resource_widow_def = OrcHttpNewResource("WindowDef")
Ejemplo n.º 2
0
    def __init__(self):

        object.__init__(self)

        self.__resource_case_def = OrcHttpNewResource("CaseDef")
        self.__resource_step_det = OrcHttpNewResource("StepDet")
        self.__resource_item = OrcHttpNewResource("Item")
Ejemplo n.º 3
0
    def __init__(self):

        # Log
        self.__logger = OrcLog("api.driver.service")

        self.__resource_page_def = OrcHttpNewResource("PageDef")
        self.__resource_page_det = OrcHttpNewResource("PageDet")
        self.__resource_widget_def = OrcHttpNewResource("WidgetDef")
        self.__resource_widget_det = OrcHttpNewResource("WidgetDet")
Ejemplo n.º 4
0
    def __init__(self):

        # Log
        self.__logger = OrcLog("view.driver.web.service.web_main")

        self.__resource_page_def = OrcHttpNewResource("PageDef")
        self.__resource_page_det = OrcHttpNewResource("PageDet")
        self.__resource_widget_def = OrcHttpNewResource("WidgetDef")
        self.__resource_widget_det = OrcHttpNewResource("WidgetDet")
Ejemplo n.º 5
0
    def __init__(self):

        self.__config = get_config()
        self.__resource_batch_def = OrcHttpNewResource("BatchDef")
        self.__resource_case_def = OrcHttpNewResource("CaseDef")

        self.__list = RunCore()
        self.__home = self.__list.get_home()

        if not os.path.exists(self.__home):
            os.mkdir(self.__home)
Ejemplo n.º 6
0
    def __init__(self):

        ListTree.__init__(self)

        # Log
        self.__logger = OrcLog("view.driver.service.window")

        # Source
        self.__resource_batch_def = OrcHttpNewResource("BatchDef")
        self.__resource_batch_det = OrcHttpNewResource("BatchDet")
        self.__resource_case_def = OrcHttpNewResource("CaseDef")
        self.__resource_case_det = OrcHttpNewResource("CaseDet")
        self.__resource_step_def = OrcHttpNewResource("StepDef")
        self.__resource_step_det = OrcHttpNewResource("StepDet")
        self.__resource_item = OrcHttpNewResource("Item")

        self.__service = RunCoreService()

        self.__home = get_config().get_option("RUN", "home")
        self.__home_run = None  # 运行时目录,为home目录/case(batch)/time

        self.__list = []  # 列表
        self.__root_id = None  # 根元素 id

        self.__run_list = []  # 执行列表,batch->item,用于查找数据及控件...
        self.__run_logger = RunLog()
Ejemplo n.º 7
0
    def get_page_def_flag(p_id):
        """
        获取页面标识
        :param p_id:
        :return:
        """
        resource_page_def = OrcHttpNewResource("PageDef")
        resource_page_def.set_path(p_id)

        page_def_data = resource_page_def.get()

        return None if not page_def_data else page_def_data["page_flag"]
Ejemplo n.º 8
0
    def get_lib_dict_text(p_flag, p_value):
        """
        获取操作文字
        :param p_value:
        :param p_flag:
        :return:
        """
        resource_dict = OrcHttpNewResource("Dict")
        dict_data = resource_dict.get(
            dict(dict_flag=p_flag, dict_value=p_value))

        return None if not dict_data else dict_data[0]["dict_text"]
Ejemplo n.º 9
0
    def test_get_data(self):

        OrcTest.test_print_begin()

        test = OrcHttpNewResource("Data")
        result = test.get({
            "src_type": "CASE",
            "data_flag": "3300000019",
            "src_id": "2000000003"
        })
        OrcTest.test_print_result(result)

        OrcTest.test_print_end()
Ejemplo n.º 10
0
    def get_widget_def_path(p_id):
        """
        获取控件路径
        :param p_id:
        :return:
        """
        resource_widget_def = OrcHttpNewResource("WidgetDef")
        resource_widget_def.set_path(p_id)

        widget_def_data = resource_widget_def.get()

        return None if not resource_widget_def else widget_def_data[
            "widget_path"]
Ejemplo n.º 11
0
    def test_http_res_01(self):
        """
        test get dict
        :return:
        """
        OrcTest.test_print_begin()

        _obj = OrcHttpNewResource('BatchDef')
        _res = _obj.get()

        OrcTest.test_print_result(_res)

        OrcTest.test_print_end()
Ejemplo n.º 12
0
    def test_list_search(self):
        """
        Test get root
        :return:
        """
        OrcTest.test_print_begin()

        run_time = OrcHttpNewResource("RunTime")

        result = run_time.get()

        OrcTest.test_print_result(result)

        OrcTest.test_print_end()
Ejemplo n.º 13
0
    def test_delete(self):
        """
        Test get root
        :return:
        """
        OrcTest.test_print_begin()

        run_time = OrcHttpNewResource("RunTime")

        run_time.set_path(1)
        result = run_time.delete()

        OrcTest.test_print_result(result)

        OrcTest.test_print_end()
Ejemplo n.º 14
0
    def test_update(self):
        """
        Test get root
        :return:
        """
        OrcTest.test_print_begin()

        run_time = OrcHttpNewResource("RunTime")

        run_time.set_path(2)
        result = run_time.put(dict(data_value=10))

        OrcTest.test_print_result(result)

        OrcTest.test_print_end()
Ejemplo n.º 15
0
    def test_list_delete(self):
        """
        Test get root
        :return:
        """
        OrcTest.test_print_begin()

        run_time = OrcHttpNewResource("RunTime")

        data = [1]
        result = run_time.delete(data)

        OrcTest.test_print_result(result)

        OrcTest.test_print_end()
Ejemplo n.º 16
0
    def test_list_add(self):
        """
        Test get root
        :return:
        """
        OrcTest.test_print_begin()

        run_time = OrcHttpNewResource("RunTime")

        data = dict(data_flag="env",
                    data_index=1,
                    data_value="3")
        result = run_time.post(data)

        OrcTest.test_print_result(result)

        OrcTest.test_print_end()
Ejemplo n.º 17
0
    def __init__(self):

        self.__res_run_def = OrcHttpNewResource("RunDef")
        self.__res_run = OrcHttpNewResource("Run")
Ejemplo n.º 18
0
    def __init__(self):

        self.__resource_web_driver = OrcHttpNewResource("Driver")
        self.__resource_item = OrcHttpNewResource("Item")
        self.__resource_data = OrcHttpNewResource("Data")
        self.__resource_view = OrcSocketResource("View")
Ejemplo n.º 19
0
    def __init__(self):

        object.__init__(self)

        self.__resource_case_def = OrcHttpNewResource("CaseDef")
        self.__resource_run_def = OrcHttpNewResource("RunDef")
Ejemplo n.º 20
0
    def __init__(self):

        object.__init__(self)

        self.__resource_batch_det = OrcHttpNewResource("BatchDet")
        self.__resource_case_def = OrcHttpNewResource("CaseDef")
Ejemplo n.º 21
0
    def __init__(self):

        self.__resource_run_det = OrcHttpNewResource("RunDet")
        self.__resource_run = OrcHttpNewResource("Run")
Ejemplo n.º 22
0
    def __init__(self):

        object.__init__(self)

        self.__resource_batch_def = OrcHttpNewResource("BatchDef")
        self.__resource_run_def = OrcHttpNewResource("RunDef")
Ejemplo n.º 23
0
    def __init__(self):

        object.__init__(self)

        self.__resource_step_def = OrcHttpNewResource("StepDef")
Ejemplo n.º 24
0
    def __init__(self):

        self.__resource_report = OrcHttpNewResource("Report")
Ejemplo n.º 25
0
 def __init__(self):
     self.__resource_data = OrcHttpNewResource("Data")
Ejemplo n.º 26
0
    def __init__(self, p_mod):

        object.__init__(self)

        self.__mod = p_mod
        self.__resource = OrcHttpNewResource("RunTime")
Ejemplo n.º 27
0
    def __init__(self):

        # Log
        self.__logger = OrcLog("view.driver.web.service.page_def")
        self.__resource_page_def = OrcHttpNewResource("PageDef")