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沒有處于選定狀態。
請問,如何同時選擇多個文件?
總結
以上是生活随笔為你收集整理的python 选择多个文件夹_如何同时选择多个文件?的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: DNF85版本短剑流剑魂时装属性怎么选择
- 下一篇: 去美国生孩子多少钱啊?