Exemple #1
0
class visit_temp(unittest.TestCase):
    log = log()

    log.info(u'开始客户管理列表部分的测试')
    @classmethod
    def setUpClass(cls):
        cls.driver=common.login()

    @classmethod
    def tearDownClass(cls):
        cls.driver.quit()

    def setUp(self):
        pass
    def tearDown(self):
        pass

    def test_1launchstore(self):

        # a = "//*[@text='%s']"%('终端门店')
        # self.driver.find_element_by_xpath(a).click()
        common.screenshot(u'工作台.png')
        common.get_name('终端门店').click()

        time.sleep(2)
Exemple #2
0
class visit_temp(unittest.TestCase):
    log = log()

    log.info(u'开始高级拜访的测试')

    @classmethod
    def setUpClass(cls):
        cls.driver = common.login()

    @classmethod
    def tearDownClass(cls):
        cls.driver.quit()

    def setUp(self):
        pass

    def tearDown(self):
        pass

    def test_1launchvisit(self):
        common.get_name('高级拜访').click()
        try:
            self.assertTrue(common.find_name(u'临时拜访'))
        except Exception, e:
            print e
            log.error('进入高级拜访模块失败')
            common.screenshot("launchvisit.png")
Exemple #3
0
class store_list(unittest.TestCase):
    log = log()

    log.info(u'开始客户管理列表部分的测试')

    @classmethod
    def setUpClass(cls):
        cls.driver = common.login()

    @classmethod
    def tearDownClass(cls):
        cls.driver.quit()

    def setUp(self):
        pass

    def tearDown(self):
        pass

    def test_1launchstore(self):
        common.screenshot(u'工作台.png')
        common.get_name('终端门店').click()

    def test_2addstore(self):
        log.info('开始新增终端门店')

        common.get_id(
            'com.fiberhome.waiqin365.client:id/cm_topbar_tv_right').click()
        common.get_name('点击输入').send_keys('test-APP')
        common.get_name('提交').click()
        common.page('工作台')
Exemple #4
0
# coding=utf-8

import yaml
from common.logs import log

log = log()


# 读取yaml文件,返回testcase的信息
class readyaml:

    # path:文件路径
    def __init__(self, path):
        self.path = path

    # 读取yaml文件
    def readYaml(self):
        try:
            f = open(self.path, encoding='utf-8')
            data = yaml.load(f)
            f.close()
            return data
        except Exception:
            log.error('未找到yaml文件')
            # print(u"未找到yaml文件")

    def alldata(self):
        data = self.readYaml()
        return data

    # 获取case的个数