An open API service indexing awesome lists of open source software.

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

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=”­Pat­h To­ IEDriverServer.exe”)`

- *Edge:*
`edgedriver = webdriver.Edge(executable_path=”­Pat­h To­ MicrosoftWebDriver.exe”)`

- *Opera:*
`operadriver = webdriver.Opera(executable_path=”­Pat­h 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!