https://github.com/divinemonk/selenium_cheatsheet
Selenium: cheatsheet
https://github.com/divinemonk/selenium_cheatsheet
automate automated-testing automation cheatsheet cheatsheets chrome firefox java java-automation python python-automation selenium selenium-java selenium-python selenium-tests selenium-webdriver
Last synced: 11 months ago
JSON representation
Selenium: cheatsheet
- Host: GitHub
- URL: https://github.com/divinemonk/selenium_cheatsheet
- Owner: Divinemonk
- License: mit
- Created: 2021-09-04T04:31:08.000Z (over 4 years ago)
- Default Branch: m41n
- Last Pushed: 2022-03-12T17:57:12.000Z (almost 4 years ago)
- Last Synced: 2025-02-05T23:30:59.775Z (about 1 year ago)
- Topics: automate, automated-testing, automation, cheatsheet, cheatsheets, chrome, firefox, java, java-automation, python, python-automation, selenium, selenium-java, selenium-python, selenium-tests, selenium-webdriver
- Homepage:
- Size: 2.93 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Selenium cheatsheet
## **To import webdriver module in python use below import statement**
```from selenium import webdriver```
## **Driver setup:**
- *Firefox:*
`firefoxdriver = webdriver.Firefox(executable_path=”Path to Firefox driver”)`
- *Chrome:*
`chromedriver = webdriver.Chrome(executable_path=”Path to Chrome driver”)`
- *Internet Explorer:*
`iedriver = webdriver.IE(executable_path=”Path To IEDriverServer.exe”)`
- *Edge:*
`edgedriver = webdriver.Edge(executable_path=”Path To MicrosoftWebDriver.exe”)`
- *Opera:*
`operadriver = webdriver.Opera(executable_path=”Path To operadriver”)`
- *Safari:*
`SafariDriver now requires manual installation of the extension prior to automation`
### Download the webdrivers from *[Official Page](https://www.selenium.dev/documentation/getting_started/installing_browser_drivers/#quick-reference)*
## **Browser Arguments:**
–headless
To open browser in headless mode. Works in both Chrome and Firefox browser
–start-maximized
To start browser maximized to screen. Requires only for Chrome browser. Firefox by default starts maximized
–incognito
To open private chrome browser
–disable-notifications
To disable notifications, works Only in Chrome browser
http://allselenium.info/python-selenium-commands-cheat-sheet-frequently-used/
> A Divinemonk creation!