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

作者在 2016-04-12 11:54:50 发布以下内容
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>
appium | 阅读 10062 次
文章评论,共0条
游客请输入验证码
浏览2354408次