---
---

[Selenium Documentation](https://www.seleniumhq.org/docs/03_webdriver.jsp)

### Setup
```shell
sudo apt install chromium-browser

# Download and move WebDriver to path
# https://sites.google.com/a/chromium.org/chromedriver/downloads
curl https://chromedriver.storage.googleapis.com/2.45/chromedriver_linux64.zip > chromedriver_linux64.zip
unzip chromedriver_linux64.zip
mv chromedriver ~/bin/chromedriver

pip install selenium
```

### Basic script
```python
# main.py
from selenium import webdriver

browser = webdriver.Chrome()
browser.get('http://seleniumhq.org/')
browser.quit()
```

### Run
```shell
python main.py
```

---
---

[Selenium Documentation](https://www.seleniumhq.org/docs/03_webdriver.jsp)

### Setup
```shell
sudo apt install chromium-browser

# Download and move WebDriver to path
# https://sites.google.com/a/chromium.org/chromedriver/downloads
curl https://chromedriver.storage.googleapis.com/2.45/chromedriver_linux64.zip > chromedriver_linux64.zip
unzip chromedriver_linux64.zip
mv chromedriver ~/bin/chromedriver

pip install selenium
```

### Basic script
```python
# main.py
from selenium import webdriver

# No options
browser = webdriver.Chrome()
browser.get('http://seleniumhq.org/')
browser.quit()

# With options
options = webdriver.ChromeOptions()
options.add_argument('--headless')  # Hidden browser
options.add_argument('--disable-infobars')
options.add_argument('--disable-extensions')
options.add_argument('--window-position=0,0')
options.add_argument('--window-size=1280,920')
browser = webdriver.Chrome(options=options)
```

### Run
```shell
python main.py
```

Add selenium note: running driver with options
Add selenium note: running driver with options
