WebRunner.py 文件源码

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

项目:PyWebRunner 作者: IntuitiveWebSolutions 项目源码 文件源码
def wait_for_opacity(self, selector, opacity, **kwargs):
        '''
        Wait for an element to reach a specific opacity.

        Parameters
        ----------
        selector: str
            A CSS selector to search for. This can be any valid CSS selector.

        opacity: float
            The opacity to wait for.

        kwargs:
            Passed on to _wait_for

        '''

        def _wait_for_opacity(self, browser):
            return str(self.get_element(selector).value_of_css_property('opacity')) == str(opacity)

        self._wait_for(partial(_wait_for_opacity, self), **kwargs)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号