Sha256: 1d882f1587b4e91848942897bf50f6a714d8f3809054b7b324cea16682eed327

Contents?: true

Size: 573 Bytes

Versions: 38

Compression:

Stored size: 573 Bytes

Contents

require "watirspec_helper"

describe "TextArea" do
  before :each 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

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
watir-6.13.0 spec/watirspec/elements/textarea_spec.rb
watir-6.12.0 spec/watirspec/elements/textarea_spec.rb
watir-6.11.0 spec/watirspec/elements/textarea_spec.rb
watir-6.11.0.beta2 spec/watirspec/elements/textarea_spec.rb
watir-6.11.0.beta1 spec/watirspec/elements/textarea_spec.rb
watir-6.10.3 spec/watirspec/elements/textarea_spec.rb
watir-6.10.2 spec/watirspec/elements/textarea_spec.rb
watir-6.10.0 spec/watirspec/elements/textarea_spec.rb
watir-6.9.1 spec/watirspec/elements/textarea_spec.rb
watir-6.9.0 spec/watirspec/elements/textarea_spec.rb
watir-6.8.4 spec/watirspec/elements/textarea_spec.rb
watir-6.8.3 spec/watirspec/elements/textarea_spec.rb
watir-6.8.2 spec/watirspec/elements/textarea_spec.rb
watir-6.8.1 spec/watirspec/elements/textarea_spec.rb
watir-6.8.0 spec/watirspec/elements/textarea_spec.rb
watir-6.7.3 spec/watirspec/elements/textarea_spec.rb
watir-6.7.2 spec/watirspec/elements/textarea_spec.rb
watir-6.7.1 spec/watirspec/elements/textarea_spec.rb
watir-6.7.0 spec/watirspec/elements/textarea_spec.rb
watir-6.6.3 spec/watirspec/elements/textarea_spec.rb