+ 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'

11th Dec 2018, 8:25 PM
MyMomAteMyCat123
MyMomAteMyCat123 - avatar
10 odpowiedzi
+ 9
Wrong again... import selenium from selenium import webdriver driver = webdriver.Firefox() ...your code
11th Dec 2018, 8:55 PM
r8w9
r8w9 - avatar
+ 6
MyMomAteMyCat123 Hey, try to import webdriver also. import selenium from selenium import webdriver
11th Dec 2018, 8:46 PM
r8w9
r8w9 - avatar
+ 6
You need your driver in path or you can simply copy and paste geckodriver.exe to the folder where is your script.
11th Dec 2018, 9:01 PM
r8w9
r8w9 - avatar
+ 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.
12th Dec 2018, 8:21 AM
r8w9
r8w9 - avatar
+ 1
Try with: from selenium import webdriver driver = webdriver.Firefox()
11th Dec 2018, 8:48 PM
Adam Hmidi
Adam Hmidi - avatar
+ 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
12th Dec 2018, 3:01 AM
Adam Hmidi
Adam Hmidi - avatar
0
\AppData\Local\Programs\Python\Python37-32\WebControl.py
11th Dec 2018, 9:02 PM
MyMomAteMyCat123
MyMomAteMyCat123 - avatar
0
can you plz give me your no. I have problem in coding of html
12th Dec 2018, 8:17 AM
Mridul Raghuvanshi
Mridul Raghuvanshi - avatar
- 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'
11th Dec 2018, 8:53 PM
MyMomAteMyCat123
MyMomAteMyCat123 - avatar
- 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.
11th Dec 2018, 8:57 PM
MyMomAteMyCat123
MyMomAteMyCat123 - avatar