Sha256: 0ae23d3a5061fd5cb72820aea531d0eb706c6444ab4a8bed210cf4c4ecea3576

Contents?: true

Size: 653 Bytes

Versions: 3

Compression:

Stored size: 653 Bytes

Contents

# frozen_string_literal: true

require 'watirspec_helper'

module Watir
  describe TextArea do
    before do
      browser.goto WatirSpec.url_for('forms_with_input_elements.html')
    end

    let(:textarea) { browser.textarea }

    it 'can set a value' do
      textarea.set 'foo'
      expect(textarea.value).to eq 'foo'
    end

    it 'can clear a value' do
      textarea.set 'foo'
      textarea.clear
      expect(textarea.value).to eq ''
    end

    it 'locates textarea by value' do
      browser.textarea.set 'foo'
      expect(browser.textarea(value: /foo/)).to exist
      expect(browser.textarea(value: 'foo')).to exist
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
watir-7.3.0 spec/watirspec/elements/textarea_spec.rb
watir-7.2.2 spec/watirspec/elements/textarea_spec.rb
watir-7.2.1 spec/watirspec/elements/textarea_spec.rb