WebRunner.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:PyWebRunner 作者: IntuitiveWebSolutions 项目源码 文件源码
def set_select_by_text(self, select, text):
        '''
        Set the selected value of a select element by the visible text.

        Parameters
        ----------
        select: str or selenium.webdriver.remote.webelement.WebElement
            Any valid CSS selector or a selenium element
        text: str
            The visible text in the select element option. (Not the value)

        '''
        if isinstance(select, str):
            elem = self.get_element(select)
        else:
            elem = select

        sel = Select(elem)
        sel.select_by_visible_text(text)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号