摘要: 一、安装xlrd模块 到python官网下载http://pypi.python.org/pypi/xlrd模块安装,前提是已经安装了python 环境。二、使用介绍 1、导入模块 import xlrd 2、打开Excel文件读取数据 data = xlrd.open_workbook('excelFile.xls') 3、使用技巧 获取一个工作表 table = data.sheets()[0] #通过索引顺序获取 table = data.sheet_by_index(0) #通过索引顺序获取 table = data.sheet_by_name(u'Sheet1 阅读全文
posted @ 2013-07-15 21:40 Roger| 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 1 # -*- coding:utf-8 -*- 2 """ 3 数据驱动测试,从 csv 文件中读取数据 4 """ 5 from selenium import webdriver 6 import csv, sys 7 8 9 test_executed = 010 test_passed = 011 test_failed = 012 test_status = True13 14 15 try:16 driver = webdriver.Firefox()17 driver.get('C:\BMICalculator 阅读全文
posted @ 2013-07-15 21:36 Roger| 阅读(581) 评论(0) 推荐(0) 编辑