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

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

        <small id='7mC9L'></small><noframes id='7mC9L'>

      2. <legend id='7mC9L'><style id='7mC9L'><dir id='7mC9L'><q id='7mC9L'></q></dir></style></legend>

        棄用警告:在 Windows 10 系統(tǒng)上通過 Selenium 使用 C

        DeprecationWarning: use options instead of chrome_options error using ChromeDriver and Chrome through Selenium on Windows 10 system(棄用警告:在 Windows 10 系統(tǒng)上通過 Selenium 使用 ChromeDriver 和 Chrome 時使用選項而不是
        <tfoot id='fEV2l'></tfoot>

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

          <tbody id='fEV2l'></tbody>

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

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

                  本文介紹了棄用警告:在 Windows 10 系統(tǒng)上通過 Selenium 使用 ChromeDriver 和 Chrome 時使用選項而不是 chrome_options 錯誤的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  嘗試在我的 Windows 10 機器上運行此代碼 https://github.com/KalleHallden/reddit_automations/blame/master/movie-tickets.py

                  Trying to run this code on my windows 10 machine https://github.com/KalleHallden/reddit_automations/blame/master/movie-tickets.py

                  from selenium import webdriver
                  from selenium.webdriver.common.keys import Keys
                  from decouple import config
                  import time
                  
                  # the way to locate the button or thing you want on a website in chrome is
                  # by pressing cmd + shift + c and then you can use your mouse to find the 
                  # info on the element that you want and you can copy the full xpath.
                  
                  options = webdriver.ChromeOptions()
                  # options.add_argument('--ignore-certificate-errors')
                  # options.add_argument('--incognito')
                  # options.add_argument('--headless')
                  driver = webdriver.Chrome("/Users/kalle/Downloads/chromedriver83", chrome_options=options)
                  driver.get(config('THEATRE_SITE'))
                  # for some odd reason you need to reload the site for it to load.
                  # possibly a bug of the theatre site
                  driver.get(config('THEATRE_SITE'))
                  time.sleep(3)
                  # select city
                  button = driver.find_element_by_xpath('/html/body/div[1]/div[3]/div/div/div[1]/div/div[2]/ul/li[1]/label/input')
                  button.click()
                  
                  # save city
                  button = driver.find_element_by_xpath('/html/body/div[1]/div[3]/div/div/div[2]/span/button')
                  button.click()
                  time.sleep(2)
                  
                  # proceed to tickets tab
                  button = driver.find_element_by_xpath('/html/body/div[1]/nav/div[2]/div[2]/div[1]/ul[1]/li[1]/a')
                  button.click()
                  time.sleep(2)
                  
                  # select the movie you want (should be more specific than just selecting the first one but whateva)
                  button = driver.find_element_by_xpath('/html/body/div[1]/main/div/div[2]/div/div/div/div[2]/div/div[2]/div[2]/div[2]/ul/li[1]/ul/li/div/div[1]/div/span[2]/a')
                  button.click()
                  time.sleep(1)
                  
                  # select the time you want to go
                  button = driver.find_element_by_xpath('/html/body/div[1]/main/div/div[1]/div/div/div/div[4]/section/div/div[2]/div[2]/ul/li/ul/li[1]/div/span/span[3]/span[2]/span')
                  button.click()
                  time.sleep(1)
                  
                  # choose amount of people
                  button = driver.find_element_by_xpath('/html/body/div[1]/main/div/div[2]/div/div/div/div/section/div/div[2]/div/button')
                  button.click()
                  time.sleep(2)
                  
                  # choose seats
                  button = driver.find_element_by_xpath('/html/body/div[1]/main/div/div[1]/div/div/div/div[2]/section/div[3]/div[2]/button')
                  button.click()
                  time.sleep(2)
                  
                  # pay
                  button = driver.find_element_by_xpath('/html/body/div[1]/main/div/div[1]/div/div/div/div[2]/section/div[4]/div/div[2]/button/span')
                  button.click()
                  

                  我已經(jīng)安裝了所有正確的程序:

                  I have all the correct programs installed:

                  • 運行 python 3.8
                  • 已安裝 chrome 網(wǎng)絡(luò)驅(qū)動程序
                  • 運行 84 版穩(wěn)定版 chrome 網(wǎng)絡(luò)瀏覽器

                  當我運行該程序時,它會打開 chrome,但是我得到一個空白網(wǎng)頁,上面什么都沒有,只有一些文字顯示數(shù)據(jù):".僅此而已.

                  When I run the program it opens chrome however I get a blank web page with nothing on there but some text which says "data:." that is all nothing else.

                  這是我在 VS 代碼中遇到的錯誤:

                  This is the error I get in VS code:

                  :Usersuser>python c:/chromedriver_win32/movie-tickets1.py
                  c:/chromedriver_win32/movie-tickets1.py:15: DeprecationWarning: use options instead of chrome_options
                    driver = webdriver.Chrome(executable_path=r'C:chromedriver_win32chromedriver.exe', chrome_options=options)
                  
                  DevTools listening on ws://127.0.0.1:29442/devtools/browser/872d4312-b51d-4a38-bc1b-3b80495950
                  Traceback (most recent call last):
                    File "c:/chromedriver_win32/movie-tickets1.py", line 17, in <module>
                      driver.get(config("https://www.google.co.uk"))
                    File "C:UsersuserAppDataLocalPackagesPythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0LocalCachelocal-packagesPython38site-packagesdecouple.py", line 199, in __call__
                      return self.config(*args, **kwargs)
                    File "C:UsersuserAppDataLocalPackagesPythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0LocalCachelocal-packagesPython38site-packagesdecouple.py", line 83, in __call__
                      return self.get(*args, **kwargs)
                    File "C:UsersuserAppDataLocalPackagesPythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0LocalCachelocal-packagesPython38site-packagesdecouple.py", line 68, in get
                      raise UndefinedValueError('{} not found. Declare it as envvar or define a default value.'.format(option))
                  decouple.UndefinedValueError: https://www.google.co.uk not found. Declare it as envvar or define a default value.
                  

                  任何幫助將不勝感激,我不確定為什么解耦不起作用.

                  Any help would be much appreciated, I am unsure why decouple is not working.

                  推薦答案

                  這個錯誤信息...

                  DeprecationWarning: use options instead of chrome_options
                  

                  ...暗示您在您的程序中使用 chrome_options 來啟動 Selenium 驅(qū)動 ChromeDriver 啟動 google-chrome 瀏覽上下文.

                  ...implies that in your program you have used chrome_options to initiate a Selenium driven ChromeDriver initiated google-chrome Browsing Context.

                  chrome_options 現(xiàn)在已棄用,您必須改用 options 并傳遞 ChromeDriver絕對路徑em> 以及擴展名.

                  chrome_options is deprecated now and you have to use options instead as well as pass the absolute path of the ChromeDriver along with the extension.

                  當您在 上觸發(fā)測試時windows-10 系統(tǒng),實際上你的代碼行將是:

                  As you are triggering your tests on a windows-10 system, effectively you line of code will be:

                  options = webdriver.ChromeOptions()
                  options.add_argument('--headless')
                  driver = webdriver.Chrome(executable_path=r'C:chromedriver_win32chromedriver.exe', options=options)
                  

                  這篇關(guān)于棄用警告:在 Windows 10 系統(tǒng)上通過 Selenium 使用 ChromeDriver 和 Chrome 時使用選項而不是 chrome_options 錯誤的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  How to make a discord bot that gives roles in Python?(如何制作一個在 Python 中提供角色的不和諧機器人?)
                  Discord bot isn#39;t responding to commands(Discord 機器人沒有響應(yīng)命令)
                  Can you Get the quot;About mequot; feature on Discord bot#39;s? (Discord.py)(你能得到“關(guān)于我嗎?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 - 自動更改角色顏色)

                        • <bdo id='hExGh'></bdo><ul id='hExGh'></ul>
                        • <tfoot id='hExGh'></tfoot>
                          <legend id='hExGh'><style id='hExGh'><dir id='hExGh'><q id='hExGh'></q></dir></style></legend>
                        • <small id='hExGh'></small><noframes id='hExGh'>

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

                            主站蜘蛛池模板: 韩日一区二区三区 | 欧美一级片在线观看 | 噜久寡妇噜噜久久寡妇 | www.99re| 国产精品无码久久久久 | 久久久福利 | 免费黄色大片 | 男女免费网站 | 久久久成人免费一区二区 | 亚洲免费一区二区 | 成人特级毛片 | 成人在线免费网站 | 国产区在线观看 | 国产精品久久久久9999鸭 | 国产wwwcom| 欧美一区二区在线免费观看 | 在线免费小视频 | 黄色免费看 | 欧美精品三区 | 成人一区二区三区在线观看 | 日韩精品一区二区三区高清免费 | 欧美一区二区三区精品免费 | 福利视频一区 | 波霸ol一区二区 | 欧美一区二区三区高清视频 | 国产成人高清 | 日日夜夜精品免费视频 | 天天操天天摸天天干 | 中文字幕一区二区三 | av毛片 | 福利视频网站 | 久久久久国产精品一区三寸 | 久草网站 | 精品一二三区视频 | 中文字幕日韩一区 | av午夜电影 | 成人精品区 | 亚洲一区免费 | 精品一区二区三区不卡 | 一区二区三区韩国 | 中文字幕高清 |