def __init__(self,driver):
     Base.__init__(self,driver)
     yaml = ReadYaml("./data/element_loc.yaml")
     self.company_notice_more_loc=yaml.analysis_data("index","company_notice_more_loc") # 公司公告【更多】
     self.operation_column_loc=yaml.analysis_data("notice_list","operation_column_loc")  # 操作列
     self.row_titles_loc=yaml.analysis_data("notice_list","row_titles_loc")  #所有文章标题
     self.top_btns_loc=yaml.analysis_data("notice_list","top_btns_loc") #所有置顶按钮
     self.toast_loc = yaml.analysis_data("edit_notice", "toast_loc")  # toast信息
     self. article_rows_loc=yaml.analysis_data("notice_list","article_rows_loc") #列表中的所有行
     self.top_icons_loc=yaml.analysis_data("notice_list","top_icons_loc") #【顶】标签
     self.time_columns_loc=yaml.analysis_data("notice_list","time_columns_loc")  #时间列(包含表头)
     self.refresh_btns_loc=yaml.analysis_data("notice_list","refresh_btns_loc")  #所有【刷新】按钮
     self.delete_btns_loc=yaml.analysis_data("notice_list","delete_btns_loc")  #所有【删除】按钮
     self.notice_count_text=yaml.analysis_data("notice_list","notice_count_text")  #公告记录数文本
     self.confirm_btn_loc=yaml.analysis_data("notice_list","confirm_btn_loc") # 提示消息-【确定】按钮
Esempio n. 2
0
    def __init__(self):
        Base.__init__(self)

        # CORS headers added here.
        self.ui_headers = [
            ("Access-Control-Allow-Origin", "*"),
            ("Access-Control-Allow-Headers", "Content-Type"),
            ("Access-Control-Allow-Methods", "GET, POST, OPTIONS"),
            ("Content-Type", "text/plain"),
        ]

        self.json_response = """
        {
             "messages": [
                 ${MESSAGES_ARRAY}
             ]
        }\
       """

        self.rsp_msg = """
        {
              "type": "${TYPE}",
              "${FORMAT}": "${OUTPUT_MESSAGE}"
        }\
       """

        self.json_response_template = Template(self.json_response)
        self.rsp_msg_template = Template(self.rsp_msg)

        # Pattern's of the three types of queries which the end user can enter
        # on the lessenger UI.

        self.location_pattern_strings = [
            r"\s*what\'s\s+the\s+weather\s+in\s+([a-zA-Z0-9 ]*.*)\s*",
            r"\s*weather\s+in\s+([a-zA-Z0-9 ]*.*)\s*",
            r"\s*([a-zA-Z0-9 ]*.*)weather\s*"
        ]
Esempio n. 3
0
 def __init__(self):
     Base.__init__(self)
 def __init__(self, driver):
     Base.__init__(self, driver)
     yaml = ReadYaml("./data/element_loc.yaml")
     self.setting_btn_loc = yaml.analysis_data("index",
                                               "setting_btn_loc")  # 【设置】按钮