python 选择多个文件夹_如何同时选择多个文件?

登录百度网盘后,我想一次选定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没有处于选定状态。

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值