コード例 #1
0
    def __init__(self, all_config, driver):
        self.driver = driver
        self.obj_utils = utils.Tools(self.driver)
        self.hallCode = all_config['protocol_first_hallCode']
        self.hallCode_second = all_config['protocol_second_hallCode']

        self.user = all_config['protocol_first_username']
        self.pwd = all_config['protocol_first_pwd']
        self.reader_one_username = all_config['reader_one_username']
        self.reader_one_pwd = all_config['reader_one_pwd']
コード例 #2
0
	def __init__(self, all_config):
		self.obj_tools = utils.Tools()
		# self.hallCode =  self.obj_utils.hallCode
		self.user = all_config['username']
		self.pwd = all_config['pwd']
		self.port = all_config['port']
		self.ip = all_config['ip']
		self.my_user1 = all_config['my_user1']
		self.my_pwd1 = all_config['my_pwd1']
		self.add = self.obj_tools.add
コード例 #3
0
 def setUp(self):
     desired_caps = {}
     desired_caps['device'] = 'android'
     desired_caps['platformName'] = 'Android'
     desired_caps['browserName'] = ''
     # desired_caps['version'] = '5.5.1'
     desired_caps['version'] = '6.0.1'
     desired_caps['deviceName'] = '8ded651f'
     # desired_caps['deviceName'] = '074a3332211576bb'
     desired_caps['noReset'] = 'True'
     desired_caps[
         'app'] = r'C:\Users\Administrator\Desktop\APP\wanxiangwuyu.apk'
     desired_caps['unicodeKeyboard'] = 'True'
     desired_caps['resetKeyboard'] = 'True'
     desired_caps['automationName'] = 'Uiautomator2'
     self.driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub',
                                    desired_caps)
     self.driver.implicitly_wait(10)
     self.obj_utils = utils.Tools(self.driver)
     self.all_config = self.obj_utils.init_allconfig(configfile)
     self.obj_test_case = Test_case(self.all_config, self.driver)
コード例 #4
0
ファイル: test_case.py プロジェクト: lyp594797433/Yunyun_api
 def __init__(self, all_config):
     runner.Runner.__init__(self, all_config)
     self.obj_tools = utils.Tools()
コード例 #5
0
        if count_app_pageview == count_pageview_db:
            obj_log.info("数据库阅读量:{}".format(count_pageview_db))
            obj_log.info("APP阅读量:{}".format(count_app_pageview))
            obj_log.info("数据库阅读量与APP阅读量一致.........")
            return True
        else:
            obj_log.info("数据库阅读量:{}".format(count_pageview_db))
            obj_log.info("APP阅读量:{}".format(count_app_pageview))
            obj_log.info("数据库阅读量与APP阅读量不一致.........")
            return False

        return True


'''******************************************************************************************************************'''
obj_tools = utils.Tools()
all_config = obj_tools.all_config
obj_runner = Test_case(all_config)


class Multi_new_add(threading.Thread):
    def __init__(self, hallcode, type, is_need_review):
        threading.Thread.__init__(self)
        self.hallcode = hallcode
        self.type = type
        self.is_need_review = is_need_review
        self.ret = ''

    def run(self):
        # self.ret = Runner._new_add(self.hallcode, self.type, self.is_need_review)
        self.ret = obj_runner.new_add(self.hallcode, self.type,
コード例 #6
0
# -*- coding=utf-8 -*-
import utils, time, log, re, sys, json, simplejson, random
from selenium import webdriver
from bs4 import BeautifulSoup
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.keys import Keys
# from pymouse import PyMouse
from selenium.webdriver.support.select import Select
import selenium.webdriver.support.ui as ui

obj_log = log.get_logger()
obj_utils = utils.Tools()


def init_allElementConfig():
    element_config = 'element_config.ini'
    all_elementConfig = {}
    # all_config_items = obj_utils.get_config_items(configfile)
    all_config_section = obj_utils.get_config_sections(element_config)
    for section in all_config_section:
        all_config_items = obj_utils.get_config_items(section, element_config)
        for i in range(len(all_config_items)):
            all_elementConfig[all_config_items[i][0]] = all_config_items[i][1]
    return all_elementConfig