tools.py 文件源码

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

项目:reahl 作者: reahl 项目源码 文件源码
def press_tab(self):
        """Simulates the user pressing the tab key on element that is currently focussed.

        .. versionchanged: 4.0
           Changed to operate on the currently focussed element.
        """
        el = self.web_driver.switch_to.active_element
        el.send_keys(Keys.TAB)
        # To ensure the element gets blur event which for some reason does not always happen when pressing TAB:
        self.web_driver.execute_script('if ( "undefined" !== typeof jQuery) {jQuery(arguments[0]).blur();};', el)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号