账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    如何同时选择多个文件?
    40
    0

    登录百度网盘后,我想一次选定2个文件

    方法1:

    path1 = driver.find_element_by_xpath('//a[@title="test1"]')
    ActionChains(driver).move_to_element(path1).perform()
    ActionChains(driver).context_click(path1).perform()
    path2 = driver.find_element_by_xpath('//a[@title="test2"]')
    ActionChains(driver).move_to_element(path2).perform()
    ActionChains(driver).context_click(path2).perform()
    

    方法2:

    path = driver.find_element_by_xpath('//a[@title="test1"]|//a[@title="test2"]')
    ActionChains(driver).move_to_element(path).perform()
    ActionChains(driver).context_click(path).perform()
    

    方法3:

    path = driver.find_element_by_xpath('//a[@title="test1"or @title="test2"]')
    ActionChains(driver).move_to_element(path).perform()
    ActionChains(driver).context_click(path).perform()
    

    三种方法都不行,运行后,发现只能选定最后一个文件test2 ,test1没有处于选定状态。

    请问,如何同时选择多个文件?

    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部