>cd C:\ruby\lib\ruby\gems\1.8\gems\watir-1.5.6\watir\
>regsvr32 AutoItX3.dll
enjoy Watir!
>cd C:\ruby\lib\ruby\gems\1.8\gems\watir-1.5.6\watir\
>regsvr32 AutoItX3.dll
cmd.exe
>vmware-vdiskmanager.exe -xGB .vmdk
cd jruby-rack
PATH-TO-JRUBY/bin/jruby -S rake SKIP_SPECS=true
#!/usr/bin/env ruby
require 'test/unit'
require 'rubygems'
require 'watir'
require 'win32ole'
class FileUpLoadTest < Test::Unit::TestCase
include Watir
def test_fileup
ie = Watir::IE.new
ie.goto('foo.com/fileup.html')
assert(ie.file_field(:name,"register_data").exists?,message="error none file field")
#Start down load
ie.file_field(:id,'register_data').click_no_wait
# should click_no_wait,otherwise wait forever behind modal window.
windwName_dwn = "ファイルのダウンロード"
windwName_sve = "名前を付けて保存"
autoit=WIN32OLE.new("AutoItX3.Control")
autoit.WinWait(windwName_dwn)
autoit.WinActivate(windwName_dwn)
autoit.ControlClick(windwName_dwn,"","[CLASS:Button;INSTANCE:2]")
pathAndName = "var/foo.txt"
autoit.WinWait(windwName_sv)
autoit.WinActivate(windwName_sv)
autoit.ControlSetText(windwName_sv, "", 1148, "#{pathAndName}")
autoit.ControlClick(windwName_sv,"","[CLASS:Button;INSTANCE:2]")
autoit.WinWait("ダウンロードの完了")
end
end
#!/usr/bin/env ruby
require 'test/unit'
require 'rubygems'
require 'watir'
require 'win32ole'
class FileUpLoadTest < Test::Unit::TestCase
include Watir
def test_fileup
ie = Watir::IE.new
ie.goto('foo.com/fileup.html')
assert(ie.file_field(:name,"register_data").exists?,message="error none file field")
path = "C:\\InstantRails-2.0-win\\rails_apps\\somefile.csv" # set("#{path}")
ie.file_field(:id,'register_data').click_no_wait
# debug code check file path and sleep sec.
puts "#{path}"
puts Time.now
sleep(5)
puts Time.now
# debug code end
autoit=WIN32OLE.new("AutoItX3.Control")
autoit.WinWait("ファイルの選択")
autoit.WinActivate("ファイルの選択")
autoit.ControlSetText("ファイルの選択", "", 1148, "#{path}")
autoit.Send("{ENTER}")
ie.button(:name,"btnSubmitFile").click
wait_until {ie.text.include? "アップロードされました。"} #rendering待ち
assert(ie.text.include?("アップロードされました。"),message="error import" ) #データインポートチェック
ie.close
end
end
At kernel 3 find wireless hardware lspci | grep -i wireless check using current kernel module with PCI bus address lspci -vv -s 0c:...