SeleniumBase/help_docs/verify_webdriver.md

40 lines
754 B
Markdown
Raw Normal View History

2019-11-04 14:16:47 +08:00
## Verifying that web drivers are installed
2019-11-04 14:16:47 +08:00
*You can do this by checking inside a Python command prompt.*
#### Verifying ChromeDriver
```bash
python
2019-11-04 14:16:47 +08:00
```
```python
>>> from selenium import webdriver
2019-11-04 14:16:47 +08:00
>>> driver = webdriver.Chrome()
>>> driver.get("https://www.google.com/chrome")
>>> driver.quit()
>>> exit()
```
2019-11-04 14:16:47 +08:00
#### Verifying Geckodriver (Firefox WebDriver)
```bash
python
2019-11-04 14:16:47 +08:00
```
```python
>>> from selenium import webdriver
>>> driver = webdriver.Firefox()
>>> driver.get("https://www.mozilla.org/firefox")
>>> driver.quit()
>>> exit()
```
#### Verifying WebDriver for Safari
```bash
python
```
```python
>>> from selenium import webdriver
2019-11-04 14:16:47 +08:00
>>> driver = webdriver.Safari()
>>> driver.get("https://www.apple.com/safari")
>>> driver.quit()
>>> exit()
```