📅  最后修改于: 2023-12-03 15:05:42.405000             🧑  作者: Mango
UFT(Unified Functional Testing)是德国软件公司Micro Focus开发的一款功能测试工具。它包含了QTP (QuickTest Professional)和Service Test两个模块。
代码示例:
require 'watir-webdriver'
require 'win32ole'
# Open Internet Explorer
browser = Watir::Browser.new :ie
# Navigate to website
browser.goto 'http://www.google.com'
browser.text_field(:name => 'q').set 'Micro Focus'
browser.button.click
puts "Page title is: #{browser.title}"
# Close IE
browser.close
# Open UFT and run a test
uft = WIN32OLE.new('QuickTest.Application')
uft.Launch
uft.Visible = true
uft.Open 'C:\Test\Test1', false, false
uft.Test.Run nil, true, nil