require 'Watir' # 引入 Watir 库
require 'test/unit' # 引入 Test::Unit 库
class TC_MyTest1 < Test::Unit::TestCase # 继承类 Test::Unit::TestCase
include Watir::Exception
include Watir::ScreenCapture
def setup
getEnvInfor ( ‘ Env1 ’ ) # 获取环境信息
if ! defined? $logger # 初始化日志
$logger = LoggerFactory.start_xml_logger(FILE_PREFIX)
end
if !defined? $screen # 初始化截屏对象
$screen = Watir::ScreenCapture.new
end
|