Selenium2Library系列 keywords 之 _SelectElementKeywords 之_get_select_list_options(self, select_list_or_locator)
1 def _get_select_list_options(self, select_list_or_locator): 2 if isinstance(select_list_or_locator, Select): 3 select = select_list_or_locator 4 else: 5 select = self._get_select_list(select_list_or_locator) 6 return select, select.options
方法名:_get_select_list_options(self, select_list_or_locator)
私有方法 返回Select 元素对象和options集合
接收参数:Select 对象或locator
第2行:判断传入的参数是否为Select类型
第3行:如果true,则直接赋值给select变量
第5行:否则使用_get_select_list(self, locator)方法,返回Select对象
第6行:返回Select对象和它的options集合
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步