コード例 #1
0
 def __init__(self, driver, properties):
     self.capturePath = properties.capturePath
     self.pauseTime = properties.pauseTime
     self.implicitly_wait_time = properties.waitTimeout
     self.log4py = LoggingPorter()
     self.driver = driver
     self.Find = By
コード例 #2
0
 def __init__(self, properties):
     self.log4py = LoggingPorter()
     self.driver = None
     self.properties = properties
     self.waitTimeout = properties.waitTimeout
     self.scriptTimeout = properties.scriptTimeout
     self.pageLoadTimeout = properties.pageLoadTimeout
コード例 #3
0
 def __init__(self, file_path):
     self.log4py = LoggingPorter()
     if not os.path.exists(file_path):
         assert IOError
     self.ini_reader = ConfigParser.ConfigParser()
     self.ini_reader.read(file_path)
     self.file_path = file_path
コード例 #4
0
 def __init__(self, excelfilename):
     self.excelfilename = excelfilename
     fc = FileInspector()
     boolean = fc.is_has_file(excelfilename)
     if boolean:
         self.excel_path = fc.get_file_abspath()
     self.log4py = LoggingPorter()
コード例 #5
0
    def __init__(self):
        self.log4py = LoggingPorter()
        self.cfg = CreateConfigFile()
        self.appium_log_path = self.cfg.get_appium_logs_path()
        self.appium_port_list = []
        self.bootstrap_port_list = []
        self.device_list = []

        self.tmp = {}
コード例 #6
0
 def __init__(self):
     self.driver = None
     self.className = None
     self.mcg = MobileConfigGetter()
     self.log4py = LoggingPorter()
     self.__beforeSuiteStarts = 0
     self.__beforeClassStarts = 0
     self.__beforeTestStarts = 0
     self.init = None
コード例 #7
0
 def __init__(self, driver, properties):
     self.android = AndroidDebugBridge()
     self.log4py = LoggingPorter()
     self.driver = driver
     self.actions = []
     self.taction = TouchAction(self.driver)
     self.xml_file_path = properties.dumpxmlPath
     self.capturePath = properties.capturePath
     self.pattern = re.compile(r"\d+")
コード例 #8
0
 def __init__(self):
     self.__fileabspath = None
     self.__projectpath = None
     self.log4py = LoggingPorter()
     fc = FileInspector()
     boolean = fc.is_has_file("owl-selenium.ini")
     if boolean:
         self.__fileabspath = fc.get_file_abspath()
         self.__projectpath = fc.get_project_path()
     self.conf = ConfigReader(self.__fileabspath)
コード例 #9
0
    def __init__(self):
        self.fkctl = FileInspector()

        if self.fkctl.is_has_file("owl-appium.ini"):
            fp = self.fkctl.get_file_abspath()
            self.cfg = ConfigReader(fp)
        self.log4py = LoggingPorter()
        self.log4py.info("-----配置文件操作开始-----")
        self.f_path = os.path.join(
            self.fkctl.get_project_path(),
            self.cfg.get_value("ResultPath", "appiumService"))
コード例 #10
0
 def __init__(self, clzss):
     """
     :param clzss: 获取脚本的文件名和class名
     """
     self.driver = None
     self.className = clzss.__class__.__module__ + "." + clzss.__class__.__name__
     self.seProperties = WebConfingGetter().properties
     self.log4py = LoggingPorter()
     self.__beforeSuiteStarts = 0
     self.__beforeClassStarts = 0
     self.__beforeTestStarts = 0
     self.init = None
コード例 #11
0
 def __init__(self):
     self.fc = FileInspector()
     bools = self.fc.is_has_file("owl-framework.ini")
     if bools:
         fp = self.fc.get_file_abspath()
         conf = ConfigReader(fp)
         self.smtp_host = conf.get_value("email", "smtp_host")
         self.pop3_host = conf.get_value("email", "pop3_host")
         self.receiver = conf.get_value("email", "receiver").split(",")
         self.receiver_pa = conf.get_value("email", "receiver_pa")
         self.sender = conf.get_value("email", "sender")
         self.sender_pa = conf.get_value("email", "sender_pa")
         self.report_path = os.path.join(
             self.fc.get_project_path(),
             conf.get_value("ResultPath", "htmlreportPath"))
     self.log4py = LoggingPorter()
コード例 #12
0
def html_reporter():
    logger = LoggingPorter()
    fc = FileInspector()
    pro_path = fc.get_project_path()
    boolean = fc.is_has_file("owl-framework.ini")
    if boolean:
        inipath = fc.get_file_abspath()
        cf = ConfigReader(inipath)
    htmlrp_path = cf.get_value("ResultPath", "htmlreportPath")
    htmreportl_abs_path = os.path.join(pro_path, htmlrp_path)
    timecurrent = formated_time("%Y-%m-%d-%H-%M-%S")
    logger.debug("=====创建了一个html文件报告,路径是::" + htmreportl_abs_path)
    file_path = str(
        htmreportl_abs_path) + timecurrent + "-LDP-TestingRreporter.html"
    try:
        if os.path.exists(file_path):
            html_obj = open(file_path, "a")  # 打开文件   追加
            return html_obj
        else:
            html_obj = file(file_path, "wb+")
            return html_obj
    except Exception, e:
        logger.error("创建html_reporter出现错误" + str(e))
コード例 #13
0
 def __init__(self, properties):
     self.log4py = LoggingPorter()
     self.run_cfg = properties
     self.android = AndroidDebugBridge()
     self.run_data = None
コード例 #14
0
 def __init__(self):
     self.__fileabspath = None    # 不可访问的
     self.log4py = LoggingPorter()
コード例 #15
0
ファイル: HttpClient.py プロジェクト: zgq346712481/python-owl
 def __init__(self):
     self.log4py = LoggingPorter()
     self.timeout = 5
     self.s = Session()
コード例 #16
0
ファイル: DosCommand.py プロジェクト: zgq346712481/python-owl
 def __init__(self):
     self.log4py = LoggingPorter()