如何在Selenium IDE中选择多个应用程序元素,用户在按下ctrl键后选择这些元素?
此功能使用哪个命令?
答案 0 :(得分:0)
尝试使用addSelection(与select命令结合使用):
<tr>
<td>select</td>
<td>//select[@name='toppings']</td>
<td>olives</td>
</tr>
<tr>
<td>addSelection</td>
<td>//select[@name='toppings']</td>
<td>mushrooms</td>
</tr>
此示例适用于http://www.htmlcodetutorial.com/forms/_SELECT_MULTIPLE.html上的html代码段:
<select name="toppings" multiple="multiple" size="5" id="dougtest" style="background-color: rgb(255, 255, 255);"><option value="mushrooms">mushrooms
</option><option value="greenpeppers">green peppers
</option><option value="onions">onions
</option><option value="tomatoes">tomatoes
</option><option value="olives">olives
</option></select>