摘要: #截图功能#-*-coding=utf-8from selenium import webdriverfrom selenium.common.exceptions import NoSuchElementExceptionimport unittestimport timeclass login(unittest.TestCase): def setUp(self): self.driver = webdriver.Firefox() self.driver.implicitly_wait(10) self.base_url = "http://www.baidu.com... 阅读全文
posted @ 2013-07-02 16:58 Draycen 阅读(681) 评论(0) 推荐(0) 编辑
摘要: #生成测试报告from selenium import webdriverimport unittestimport timeimport HTMLTestRunnerclass test_class(unittest.TestCase): def setUp(self): self.verificationErrors=[] self.test=webdriver.Ie() self.url="http://192.168.0.39" def test_login(self): pa=self.test pa.get(self.url) user=pa.find_elem 阅读全文
posted @ 2013-07-02 16:24 Draycen 阅读(428) 评论(0) 推荐(0) 编辑
摘要: 为什么选python?之前的菜鸟系列是基于java的,一年没学其实也忘的差不多了,目前所测的产品部分也是python写的,而且团队也在推广python,其实就测试人员来说,python也相当受欢迎。易学,易用。翻翻各测试招聘,python出现的概率也颇高。平台搭建:前一篇中已经介绍,如果你也想体验一下自动化魅力,那就赶快搭建自己的环境吧~!selenium + python自动化测试环境搭建第一个脚本:下面看看python穿上seleniumwebdriver是多么的性感:# coding = utf-8from selenium import webdriverbrowser = webdr 阅读全文
posted @ 2013-07-02 12:19 Draycen 阅读(593) 评论(0) 推荐(0) 编辑