A. Set an environment variable for your proxy from the command line …
set HTTP_PROXY=http://my.work.proxy:8080 gem install watir
A. Set an environment variable for your proxy from the command line …
set HTTP_PROXY=http://my.work.proxy:8080 gem install watir
A. Iterate over the directory using the File class …
Example watir:
dir = File.dirname(__FILE__) Dir[File.expand_path("#{dir}/*.rb")].uniq.each do |file| require file end
A. Use %x{} to run a sub process that calls tasklist.exe …
Example watir:
if %x[tasklist /FI "IMAGENAME eq IEXPLORE.EXE" /NH] =~ /IEXPLORE/ then puts "browser IS running" else puts "no browsers running" end
A. Use the select_list comand in conjunction with the getSelectedItems command
Example html:
<select name="watirCombo"> <option value="0" selected>(please select:)</option> <option value="1">Option 1</option> <option value="2">Option 2</option> <option value="3">Option 3</option> <option value="other">Other</option> </select>
Example watir:
@b.goto('http://justaddwatir.com/watir/test_html/tc_0001_0100/test_0021.html') combo_items = @b.select_list(:name, "watirCombo").getSelectedItems puts combo_items