Selenium2Library系列 keywords 之 _SelectElementKeywords 之 _get_select_list_options_selected(self, locator)

时间:2021-08-19 03:23:03
     def _get_select_list_options_selected(self, locator):
select = self._get_select_list(locator)
# TODO: Handle possible exception thrown by all_selected_options
return select, select.all_selected_options

方法名:_get_select_list_options_selected(self, locator)

私有方法 返回Select 元素对象和选中options集合

接收参数:locator

第2行:否则使用_get_select_list(self, locator)方法,返回Select对象

第4行:返回Select 元素对象和选中options集合