Luc*_*eli 4 ruby selenium webdriver capybara selenium-webdriver
我需要fill_in一个没有的文本区域id。检查后:
<textarea class="stock-description-input js-short-description-textarea" placeholder="Select a product or enter a description" maxlength="64"></textarea>
Run Code Online (Sandbox Code Playgroud)
你知道怎么做吗?
有不同的定位技术和方法可以到达所需的元素。stock-description-input上课看起来像是一件值得依靠的事情。使用send_keys()填充的区域:
text_area = first(:css, 'textarea.stock-description-input').native
text_area.send_keys('Test')
Run Code Online (Sandbox Code Playgroud)