Sha256: 580484f67bc702196f98b415449d59f58f61b34e00e8846e39b7450d781f588c

Contents?: true

Size: 604 Bytes

Versions: 1

Compression:

Stored size: 604 Bytes

Contents

# frozen_string_literal: true

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

1 entries across 1 versions & 1 rubygems

Version Path
watir-7.2.0 spec/watirspec/elements/textarea_spec.rb