Collections:
Chrome WebDriver Script with Selenium Python API
How to create a test program using Chrome WebDriver with Selenium Python API?
✍: FYIcenter.com
Here is a simple test program that the Chrome WebDriver Test with the Selenium Python API:
C:\fyicenter> type ChromeTest.py
from selenium.webdriver import Chrome
driver = Chrome()
driver.get("http://www.google.com");
driver.quit();
Run it on the Python engine.
C:\fyicenter> python ChromeTest.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 76,
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 "ChromeTest.py", line 2, in <module>
driver = Chrome()
...
selenium.common.exceptions.WebDriverException: Message:
'chromedriver' executable needs to be in PATH. Please see
https://sites.google.com/a/chromium.org/chromedriver/home
As you can see, we got an error message: 'chromedriver' executable needs to be in PATH environment variable. See next tutorial on how to resolve the issue.
⇒ Chrome WebDriver Test with Selenium Python API
⇐ Install Selenium WebDriver Client Python API
2019-11-21, 1884🔥, 0💬
Popular Posts:
How to use HTTP protocol to post an XML message to a server? You can follow this tutorial to post an...
How to convert a date and time to a standard format? Date and time can be displayed in a number of s...
How to convert hexadecimal encoded data back to binary data (or Hex to Binary Decoding)? Hex to Bina...
How to generate ISBN numbers? To help you to obtain some ISBN numbers for testing purpose, FYIcenter...
How to generate email addresses? To help you to obtain some email addresses for testing purpose, FYI...