Sha256: 7bd3725e34417311b8a796f58cfa3b47be4091fc5f94369404fa03173e9466ef

Contents?: true

Size: 753 Bytes

Versions: 1

Compression:

Stored size: 753 Bytes

Contents

# feature tests for IE#send_keys
# revision: $Revision: 1.2 $

$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__
require 'unittests/setup'

class TC_Fields < Test::Unit::TestCase
    include Watir
    
    def setup()
        $ie.goto($htmlRoot + "textfields1.html")
    end
    
    def test_tabbing
        $ie.text_field(:name, 'text1').focus
        $ie.send_keys('{tab}')
        $ie.send_keys('Scooby')
        assert('Scooby', $ie.text_field(:name, 'beforetest').value)
    end
    
    def test_enter
        $ie.text_field(:name, 'text1').focus
        $ie.send_keys('{tab}{tab}{tab}{tab}')
        $ie.send_keys('Dooby{enter}')
        assert($ie.contains_text('PASS'))
    end
    
end
 

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
watir-1.4.1 unittests/send_keys_test.rb