Ruby

Ruby code posted
created at 16 Apr 01:34

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class ChangeAffiliation < Test::Unit::TestCase   
  
  def setup
    $browser = Watir::IE.new
    $browser.maximize()
    $browser.set_fast_speed
    load 'LoginControl.rb'
    @outputfile = File.new($LOGPATH + "\\EditOffice_" + $DateTimeStamp + ".txt", File::CREAT|File::APPEND|File::RDWR)  
    @outputfile.write("\n")
    @status = 0   
  end

  def Select_Affiliation()
    @currentaff = $browser.span(:id, /CurrentAffiliationLabel$/).text
    $browser.select_list(:id, /AffiliationDropDownList$/).select_item_in_select_list(:index, @affIndex)
    @newaff = $browser.select_list(:id, /AffiliationDropDownList$/).getSelectedItems
    
643 Bytes in 2 ms with coderay