from selenium import webdriver from selenium.webdriver.common.keys import Keys import os Game_Pin = input('Enter your PIN: ') NickNAME = input('Enter your nickname: ') def Enter_Press(): browser.find_element_by_name("Enter").click() def Kahoot_Spammer(Game_Pin, NickNAME): chromedriver = webdriver.Chrome(r'C:\WebDriver\bin\chromedriver_win32') browser = webdriver.Chrome(chromedriver) browser.get('https://kahoot.it/') game_pin = browser.find_element_by_id("Game PIN") Name = browser.find_element_by_id("Nickname") game_pin.send_keys(Game_Pin) Enter_Press() Name.send_keys(NickNAME) Enter_Press() Kahoot_Spammer(Game_Pin, NickNAME) Wondering what I have done wrong in the code above. The file I have put into the path and have ran the
icacls "pathtochromedriver" /grant Users:F command through the command prompt but it still didn't fix the problem. I have been stuck on this problem for quite some while now.
Traceback (most recent call last): File "C:\Users\ovvip\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\common\service.py", line 76, in start stdin=PIPE) File "C:\Users\ovvip\AppData\Local\Programs\Python\Python36-32\lib\subprocess.py", line 709, in __init__ restore_signals, start_new_session) File "C:\Users\ovvip\AppData\Local\Programs\Python\Python36-32\lib\subprocess.py", line 997, in _execute_child startupinfo) PermissionError: [WinError 5] Access is denied During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\ovvip\AppData\Local\Programs\Python\Python36-32\KahootSpammer.py", line 28, in <module> Kahoot_Spammer(Game_Pin, NickNAME) File "C:\Users\ovvip\AppData\Local\Programs\Python\Python36-32\KahootSpammer.py", line 13, in Kahoot_Spammer chromedriver = webdriver.Chrome(r'C:\WebDriver\bin\chromedriver_win32') File "C:\Users\ovvip\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 68, in __init__ self.service.start() File "C:\Users\ovvip\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\common\service.py", line 88, in start os.path.basename(self.path), self.start_error_message) selenium.common.exceptions.WebDriverException: Message: 'chromedriver_win32' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home Any ideas on how to fix this? Every time I ask this question I usually end up with a answer that will fix one thing but then another problem arises.