如何使用 Watir 返回下拉列表中当前选定项目的文本? getSelectedItems 似乎已被弃用。
最佳答案
改用 selected_options()。
selected_options () Description:
Gets all the selected items in the select list as an array. An empty array is returned if the select box has no selected item. Output:
Array containing the selected items of the select list.
关于ruby - Watir/ ruby : How to get the text of the selected item in a drop down list?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3541275/