dy自动化遇到的滑动问题

DrissionPage滚动页面问题

一般是这样:

driver.scroll.to_bottom()

但是dy得这样:

e = driver.ele('x://div[@class="parent-route-container route-scroll-container IhmVuo1S"]')

e.scroll.to_bottom()

查找滑动容器方法之一:

控制台输入:

复制代码
        // 查找所有可滚动的元素
    let scrollableElements = Array.from(document.querySelectorAll('*')).filter(el => {
        return el.scrollHeight > el.clientHeight && 
            (el.style.overflow === 'auto' || el.style.overflow === 'scroll' ||
                getComputedStyle(el).overflow === 'auto' || getComputedStyle(el).overflow === 'scroll');
    });

    console.log('可滚动元素:', scrollableElements);
    scrollableElements.forEach((el, i) => {
        console.log(`元素 ${i}:`, el);
        console.log('类名:', el.className);
        console.log('标签名:', el.tagName);
    });
相关推荐
IT逆夜16 分钟前
实现Yum本地仓库自动同步的完整方案(CentOS 7)
linux·运维·windows
a***592625 分钟前
用nginx正向代理https网站
运维·nginx·https
S***267530 分钟前
linux上redis升级
linux·运维·redis
ifanatic1 小时前
[每周一更]-(第161期):分析服务器中内存即将爆满过程
运维·服务器
热爱学习的小怪兽1 小时前
docker的一些常用指令
运维·docker·容器
s***4532 小时前
Linux 下安装 Golang环境
linux·运维·golang
黑客-秋凌3 小时前
软件测试面试会问的测试用例设计方法
自动化测试·软件测试·自动化·测试用例
JobDocLS3 小时前
Ubuntu22.04的安装方法
运维
豆豆的java之旅4 小时前
深入浅出Activity工作流:从理论到实践,让业务流转自动化
java·运维·自动化·activity·工作流
4***17544 小时前
Linux 下安装 Golang环境
linux·运维·golang