+ 1
Python - Need Help Again
import selenium driver = selenium.webdriver.Firefox() driver.get('https://www.instagram.com/accounts/edit/?hl=en') id_box = driver.find_element_by_id('pepUsername') id_box.send_keys('ahfuifkhiwf') driver.close() ERROR -> driver = selenium.webdriver.Firefox() AttributeError: module 'selenium' has no attribute 'webdriver'
10 Respostas
+ 9
Wrong again...
import selenium
from selenium import webdriver
driver = webdriver.Firefox()
...your code
+ 6
MyMomAteMyCat123 Hey, try to import webdriver also.
import selenium
from selenium import webdriver
+ 6
You need your driver in path or you can simply copy and paste geckodriver.exe to the folder where is your script.
+ 2
Mridul Raghuvanshi Hey, you are posting to python related thread. Your post is about html so please create question in q&a section and try to provide as much information as possible.
+ 1
Try with:
from selenium import webdriver
driver = webdriver.Firefox()
+ 1
The Selenium client bindings tries to locate the geckodriverexecutable from the system PATH. You will need to add the directory containing the executable to the system path.
On Windows you will need to update the Path system variable to add the full directory path to the executable geckodriver (don't forget to restart your system after adding executable geckodriver into system PATH to take effect).
Remember to download latest executable geckodriver
0
\AppData\Local\Programs\Python\Python37-32\WebControl.py
0
can you plz give me your no. I have problem in coding of html
- 1
import selenium as webdriver
driver = webdriver.Firefox()
driver.get('https://www.instagram.com/accounts/edit/?hl=en%27')
id_box = driver.find_element_by_id('pepUsername')
id_box.send_keys('ahfuifkhiwf')
driver.close()
ERROR -> driver = webdriver.Firefox()
AttributeError: module 'selenium' has no attribute 'Firefox'
- 1
Traceback (most recent call last):
File "C:\Users\925ra\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\common\service.py", line 76, in start
stdin=PIPE)
File "C:\Users\925ra\AppData\Local\Programs\Python\Python37-32\lib\subprocess.py", line 769, in __init__
restore_signals, start_new_session)
File "C:\Users\925ra\AppData\Local\Programs\Python\Python37-32\lib\subprocess.py", line 1172, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\925ra\AppData\Local\Programs\Python\Python37-32\WebControl.py", line 4, in <module>
driver = webdriver.Firefox()
File "C:\Users\925ra\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 164, in __init__
self.service.start()
File "C:\Users\925ra\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\common\service.py", line 83, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.