Public example: suppose we want to select multiple skills from multiple select attribute of html. How we can achieve it using karate framework. Below is the html structure:
<select name="allowed_skills_select" id="id_allowed_skills_select" multiple="">
<option value="290" selected="">Skill1</option>
<option value="289">Skill2</option>
<option value="288">Skill3</option>
</select>
From above structure I wanted to select all values i.e Skill1, Skill2 and Skill3, this can be done with control + click keyboard combination manually.
I have tried with select, mouse() and key.CONTROL as below:
And script(xpath, [{ press: 'CONTROL' }, { click: xpath }])
And input(xpath,Key.CONTROL)
* karate.key(['ctrl'])
* karate.mouse('click', {selector: xpath})