webdriver.py 文件源码

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

项目:selenium-chrome-screenshot 作者: sanscore 项目源码 文件源码
def __scrollbars_hide(self):
        """Hides Chrome's scrollbars.

        Creates a new <style> element to contain the CSS rule for hiding
        the browser scrollbars. `::-webkit-scrollbar {width: 0px;}`

        Args:
            None

        Returns:
            None
        """
        self.execute_script(
            "var sheet = document.createElement('style'); "
            "sheet.id = 'chrome_screenshot_fix'; "
            "sheet.innerHTML = '::-webkit-scrollbar {width: 0px;}'; "
            "document.body.appendChild(sheet); ")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号