2019-11-04 14:16:47 +08:00
|
|
|
## Verifying that web drivers are installed
|
2016-02-20 13:22:11 +08:00
|
|
|
|
2019-11-04 14:16:47 +08:00
|
|
|
*You can do this by checking inside a Python command prompt.*
|
2016-02-20 13:22:11 +08:00
|
|
|
|
2017-03-10 13:03:02 +08:00
|
|
|
#### Verifying ChromeDriver
|
2016-02-20 13:22:11 +08:00
|
|
|
```bash
|
|
|
|
python
|
2019-11-04 14:16:47 +08:00
|
|
|
```
|
|
|
|
```python
|
2016-02-20 13:22:11 +08:00
|
|
|
>>> from selenium import webdriver
|
2019-11-04 14:16:47 +08:00
|
|
|
>>> driver = webdriver.Chrome()
|
|
|
|
>>> driver.get("https://www.google.com/chrome")
|
|
|
|
>>> driver.quit()
|
2016-02-20 13:22:11 +08:00
|
|
|
>>> exit()
|
|
|
|
```
|
|
|
|
|
2019-11-04 14:16:47 +08:00
|
|
|
#### Verifying Geckodriver (Firefox WebDriver)
|
2016-02-20 13:22:11 +08:00
|
|
|
```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
|
2016-02-20 13:22:11 +08:00
|
|
|
>>> from selenium import webdriver
|
2019-11-04 14:16:47 +08:00
|
|
|
>>> driver = webdriver.Safari()
|
|
|
|
>>> driver.get("https://www.apple.com/safari")
|
|
|
|
>>> driver.quit()
|
2016-02-20 13:22:11 +08:00
|
|
|
>>> exit()
|
|
|
|
```
|