久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

      <small id='aBoWb'></small><noframes id='aBoWb'>

      <tfoot id='aBoWb'></tfoot>

      • <bdo id='aBoWb'></bdo><ul id='aBoWb'></ul>

      <i id='aBoWb'><tr id='aBoWb'><dt id='aBoWb'><q id='aBoWb'><span id='aBoWb'><b id='aBoWb'><form id='aBoWb'><ins id='aBoWb'></ins><ul id='aBoWb'></ul><sub id='aBoWb'></sub></form><legend id='aBoWb'></legend><bdo id='aBoWb'><pre id='aBoWb'><center id='aBoWb'></center></pre></bdo></b><th id='aBoWb'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='aBoWb'><tfoot id='aBoWb'></tfoot><dl id='aBoWb'><fieldset id='aBoWb'></fieldset></dl></div>
      1. <legend id='aBoWb'><style id='aBoWb'><dir id='aBoWb'><q id='aBoWb'></q></dir></style></legend>

        如何在 Chrome 中使用 Selenium 處理另存為對話框

        How to deal with the Save As dialog box using Selenium in Chrome(如何在 Chrome 中使用 Selenium 處理另存為對話框)

              <tbody id='hsK1d'></tbody>
            <i id='hsK1d'><tr id='hsK1d'><dt id='hsK1d'><q id='hsK1d'><span id='hsK1d'><b id='hsK1d'><form id='hsK1d'><ins id='hsK1d'></ins><ul id='hsK1d'></ul><sub id='hsK1d'></sub></form><legend id='hsK1d'></legend><bdo id='hsK1d'><pre id='hsK1d'><center id='hsK1d'></center></pre></bdo></b><th id='hsK1d'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='hsK1d'><tfoot id='hsK1d'></tfoot><dl id='hsK1d'><fieldset id='hsK1d'></fieldset></dl></div>

          1. <small id='hsK1d'></small><noframes id='hsK1d'>

            • <bdo id='hsK1d'></bdo><ul id='hsK1d'></ul>
            • <legend id='hsK1d'><style id='hsK1d'><dir id='hsK1d'><q id='hsK1d'></q></dir></style></legend>

              • <tfoot id='hsK1d'></tfoot>
                • 本文介紹了如何在 Chrome 中使用 Selenium 處理另存為對話框的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在嘗試使用 Selenium Chrome 網絡驅動程序下載文件,但我不知道如何處理另存為對話框.

                  I am trying to download a file using the Selenium Chrome web driver but I don't know how to deal with save as dialog box.

                  我已經看到很多關于如何使用 Firefox 執行此操作的答案,但沒有使用 Chrome.

                  I have seen many answers on how to do this using Firefox but none using Chrome.

                  推薦答案

                  profile = webdriver.FirefoxProfile()
                  profile.set_preference('browser.download.folderList', 2) # 自定義地點profile.set_preference('browser.download.manager.showWhenStarting',假) profile.set_preference('browser.download.dir', '/tmp')profile.set_preference('browser.helperApps.neverAsk.saveToDisk','文本/csv')

                  profile = webdriver.FirefoxProfile()
                  profile.set_preference('browser.download.folderList', 2) # custom location profile.set_preference('browser.download.manager.showWhenStarting', False) profile.set_preference('browser.download.dir', '/tmp') profile.set_preference('browser.helperApps.neverAsk.saveToDisk', 'text/csv')

                  設置這些首選項后,瀏覽器不會顯示彈出對話框詢問您是否要下載保存或其他.什么時候可以只使用 find_some_eleme = driver.find_element_by_xpath('''<somexpath>''').click() 我們可以使用任何其他方法來定位元素 xpath/id/css/name...我們自由地使用方法 click() 因為不會有對話框.或 .setPreference("browser.helperApps.neverAsk.saveToDisk","application/octet-stream,text/csv")

                  After setting these preferences the browser won't show up pop dialog asking for whether you want to download save or other. When can then just use find_some_eleme = driver.find_element_by_xpath('''<somexpath>''').click() we can use any other method of locating the element xpath/id/css/name... and we use the method click() freely because there won't be a dialog. or .setPreference("browser.helperApps.neverAsk.saveToDisk","application/octet-stream,text/csv")

                  對于 Chrome:

                  chromedriver = "path/to/chromedriver"
                  
                  os.environ["webdriver.chrome.driver"] = chromedriver
                  chrome_options = Options()
                  
                  # this is the preference we're passing
                  prefs = {'profile.default_content_setting_values.automatic_downloads': 1}
                  chrome_options.add_experimental_option("prefs", prefs)
                  driver = webdriver.Chrome(chrome_options=chrome_options)
                  

                  這篇關于如何在 Chrome 中使用 Selenium 處理另存為對話框的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How to make a discord bot that gives roles in Python?(如何制作一個在 Python 中提供角色的不和諧機器人?)
                  Discord bot isn#39;t responding to commands(Discord 機器人沒有響應命令)
                  Can you Get the quot;About mequot; feature on Discord bot#39;s? (Discord.py)(你能得到“關于我嗎?Discord 機器人的功能?(不和諧.py))
                  message.channel.id Discord PY(message.channel.id Discord PY)
                  How do I host my discord.py bot on heroku?(如何在 heroku 上托管我的 discord.py 機器人?)
                  discord.py - Automaticaly Change an Role Color(discord.py - 自動更改角色顏色)

                  <small id='wFe7d'></small><noframes id='wFe7d'>

                    <bdo id='wFe7d'></bdo><ul id='wFe7d'></ul>
                      <legend id='wFe7d'><style id='wFe7d'><dir id='wFe7d'><q id='wFe7d'></q></dir></style></legend>
                        <i id='wFe7d'><tr id='wFe7d'><dt id='wFe7d'><q id='wFe7d'><span id='wFe7d'><b id='wFe7d'><form id='wFe7d'><ins id='wFe7d'></ins><ul id='wFe7d'></ul><sub id='wFe7d'></sub></form><legend id='wFe7d'></legend><bdo id='wFe7d'><pre id='wFe7d'><center id='wFe7d'></center></pre></bdo></b><th id='wFe7d'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='wFe7d'><tfoot id='wFe7d'></tfoot><dl id='wFe7d'><fieldset id='wFe7d'></fieldset></dl></div>

                          <tbody id='wFe7d'></tbody>
                            <tfoot id='wFe7d'></tfoot>

                            主站蜘蛛池模板: 亚洲精品一区二区在线观看 | 91精品国产综合久久精品 | 亚洲成人一区二区 | 99re在线免费视频 | 欧美在线国产精品 | 国产精品99久久久久 | 毛片一级片 | 欧美伊人| 91精品国产91久久久久久 | 2022精品国偷自产免费观看 | 久久成人午夜 | 午夜久久久久 | 97超碰人人 | 国产乱人伦精品一区二区 | 五月天婷婷丁香 | 在线中文字幕第一页 | 亚欧洲精品在线视频免费观看 | 国产成人精品高清久久 | 在线观看av网站永久 | 黄色在线免费观看 | www.国产| 亚洲精品91 | 亚洲一区二区三区在线 | 欧美国产精品一区二区三区 | 福利久久 | 国产午夜精品一区二区三区四区 | 久久91精品国产一区二区三区 | 亚洲欧美中文日韩在线 | 欧美午夜精品 | 亚洲精选一区 | 日韩精品一区二区三区免费视频 | 久久影音先锋 | 日韩一区二区在线播放 | 久久a久久| 久草网站 | 99成人免费视频 | 在线日韩av电影 | 在线观看欧美日韩视频 | 午夜看电影在线观看 | 久久国产亚洲 | 亚洲a视频|