Collections:
Firefox WebDriver Script with Selenium Python API
How to create a test program using Firefox WebDriver with Selenium Python API?
✍: FYIcenter.com
Here is a simple test program that the Firefox WebDriver Test with the Selenium Python API:
C:\fyicenter> type FirefoxTest.py from selenium.webdriver import Firefox driver = Firefox() driver.get("http://www.google.com"); driver.quit();
Run it on the Python engine.
C:\fyicenter> python FirefoxTest.py Traceback (most recent call last): File "C:\Users\fyicenter\AppData\Local\Programs\Python\Python37-32 \lib\site-packages\selenium\webdriver\common\service.py", line 174, in startstdin=PIPE) File "C:\Users\fyicenter\AppData\Local\Programs\Python\Python37-32 \lib\subprocess.py", line 775, in __init__ restore_signals, start_new_session) File "C:\Users\fyicenter\AppData\Local\Programs\Python\Python37-32 \lib\subprocess.py", line 1178, 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 "FirefoxTest.py", line 2, in <module> driver = Firefox() ... selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
As you can see, we got an error message: 'geckodriver' executable needs to be in PATH environment variable. See next tutorial on how to resolve the issue.
⇒ Firefox WebDriver Test with Selenium Python API
⇐ Compatibility of WebDriver Python API for Chrome
2019-11-08, 1090🔥, 0💬
Popular Posts:
Where to find tutorials on UFT (Unified Functional Testing) tool? I want to know how to use UFT. Her...
How to generate IP Addresses? To help you to obtain some IP addresses for testing purpose, FYIcenter...
How to Pass Windows Environment Variable to JMeter? I want to use Windows temporary folder environme...
How to generate MAC addresses? To help you to obtain some MAC addresses for testing purpose, FYIcent...
How to generate ISBN numbers? To help you to obtain some ISBN numbers for testing purpose, FYIcenter...