ruby - Capybara: How to fill a textarea without an 'id'? -
i in need fill_in textarea not have id. following inspection:
<textarea class="stock-description-input js-short-description-textarea" placeholder="select product or enter description" maxlength="64"></textarea> have got idea how it?
there different location techniques , ways desired element. stock-description-input class looks thing rely on. use send_keys() fill area:
text_area = first(:css, 'textarea.stock-description-input').native text_area.send_keys('test')
Comments
Post a Comment