appium 手机app测试数据分离(2)

by admin on 2020年1月17日
import unittest,time
from publicfunction import sendEmail
n = sendEmail.SendEmailReporter()
from publicfunction import PublicFunClass
m = PublicFunClass.PublicFunClass() 
from publicfunction import readXml
yang = readXml.denglu1()
from publicfunction import sendReport
k = sendReport.sendReport()

class bruceLee(unittest.TestCase):
    def setUp(self):

        m.enterApp()

    def tearDown(self):
        time.sleep(2)
        m.quit()
    def testA(self):
#        m.login("13613552859", "111111")

        time.sleep(5)
#        n=m.duanyan("id",yang.denglu2("xml.xml","kejian1",0,"shuxing0"))
#        print n         
        self.assertTrue(m.lujingzhi("id",yang.denglu2("xml.xml", "kejian1", 0,"shuxing0")).is_displayed())

if __name__ == "__main__":


    regSuite = unittest.TestSuite()

    regSuite.addTest(bruceLee("testA"))

    k.reporter11("bruce.html", regSuite)
    time.sleep(3)
    n.SendMail("bruce.html")

<?xml version="1.0" encoding="utf-8"?>
<yhn>
    <kejian1>
        <shuxing0>com.subject.zhongchou:id/title</shuxing0>
        <text0>众筹网</text0>
        <shuxing1>//android.widget.TextView[@text='科技']</shuxing1>
        <text1>科技</text1>
        <shuxing2>//android.widget.TextView[@text='公益']</shuxing2>
        <text2>公益</text2>
        <shuxing3>//android.widget.TextView[@text='出版']</shuxing3>
        <text3>出版</text3>
        <shuxing4>//android.widget.TextView[@text='娱乐']</shuxing4>
        <text4>娱乐</text4>
        <shuxing5>//android.widget.TextView[@text='艺术']</shuxing5>
        <text5>艺术</text5>
        <shuxing6>//android.widget.TextView[@text='农业']</shuxing6>
        <text6>农业</text6>
    </kejian1>
</yhn>

发表评论

电子邮件地址不会被公开。 必填项已用*标注

网站地图xml地图