Why do i suppose to get this Selenium error? it's windows os
btw. i've used double slashes instead of backslashes
Pages 1
You are not logged in. Please login or register.
AudioGames.net Forum → Developers room → Selenium error
Why do i suppose to get this Selenium error? it's windows os
btw. i've used double slashes instead of backslashes
Uh... I have no idea what you are trying to doo. No code, no information, no error code...
yeah, you need to post the error. Also, you will probably have better luck on Stack Overflow or something.
Code is here:
from selenium import webdriver
import time
dpath = "C://Users//masku//Documents//driver.exe"
browser = webdriver.Chrome(executable_path = dpath)
driver.get = ("http://http://forum.audiogames.net/")
time.sleep(5)
driver.window_minimize
printed = driver.page_source
print(printed)
driver.quit()
Doesn't work propperly.
I'd imagine the first problem is here:
driver.get = ("http://http://forum.audiogames.net/")
As you have two http:// it probably throws it off somewhat, but that's about the best advice you'll get without showing the error too :0
i will post the full output here but, what i understand from the error that Selenium is unable to find chrome driver although boath the script that i've posted above and driver are in the same foulder. i've tried to insert path within boath using double slashes or either double backslashes. still no luck.
C:\Users\account>python C:\Users\account\Documents\Test4.py Traceback (most recent
call last):
File "C:\Users\account\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\common\service.py", l
ine 72, in start self.process = subprocess.Popen(cmd,
env=self.env,
File "C:\Users\account\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 947, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\account\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 1416, in _execute_child graphic 738 hp, ht, pid, tid
= _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the
above exception, another exception occurred:
Traceback (most recent call last): graphic 738 File "C:\Users\account\Documents\Test4.py",
line 3, in <module>
browser = webdriver.Chrome(executable_path=driver_path)
File "C:\Users\account\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\chrome\webdriver.py",graphic 738 line 73, in __init__
self.service.start()
File "C:\Users\account\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\common\service.py", lgraphic 738 ine 81, in start
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'driver.exe' executable needs to be in PATH. Please see https://
sites.google.com/a/chromium.org/chromedriver/home
@6, It told you exactly what you needed. Put the location of the driver in your PATH environment variable.
Guys. Chrome now shows up blank page instead. Can You check it out?
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
options = webdriver.ChromeOptions()
options.binary_location = r"C:\Program Files\Google\Chrome\Application\chrome.exe"
chrome_driver_path = r"C:\Program Files\Google\Chrome\Application\chrome.exe"
browser = webdriver.Chrome(chrome_driver_path, options=options)
driver_path = r"C:\Users\masku/Documents"
browser = webdriver.Chrome(executable_path=driver_path)
time.wait(5)
driver.get("http://eksisozluk.com/")
driver.title()
driver.quit()
AudioGames.net Forum → Developers room → Selenium error
Generated in 0.019 seconds (50% PHP - 50% DB) with 11 queries