HTML:
<form>
<p>
<label for="import-textarea">Use the "Export board" menu item in a board's menu, then copy the json from the resulting file.</label>
</p>
<textarea class="js-import-json" placeholder="Paste your valid JSON data here" autofocus=""/>
<input class="primary wide" type="submit" value="Import">
</form>
I want to set the text inside the textarea, with webdriver.io and tried different selectors:
const ta = browser.$('textarea');
ta.setValue('Updated Text');
const val = imp.selectByAttribute('placeholder', 'Paste your valid JSON data here');
const text = browser.getText('.js-import-json=Paste your valid JSON data here');
But none of them seemed to work. Either i get no text at all or the selector could not be found on page.
Any ideas?