| Explanation | Example | |
|---|---|---|
| get() | Navigate to a URL | get("https://www.ultranauts.com") |
| getCurrentUrl() | String value for URL of the current page | driver.getCurrentUrl() |
| getTitle() | String value for page/tab title | driver.getTitle() |
| switchTo().alert() | Set focus to a JavaScript alert | driver.switchTo().alert() |
| close() | Close the current browser window only | driver.close() |
| quit() | Close all windows & terminates the session | driver.quit() |
| isDisplayed() | True/false if an element is displayed or not | driver.findElement(By.cssSelector("input[name='username']")).isDisplayed() |
| isEnabled() | True/false if a user can interact with an element or not | driver.findElement(By.cssSelector("input[name='username']")).isEnabled() |
| isSelected() | True/false if a checkbox/dropdown/radio is chosen or not | driver.findElement(By.cssSelector("input[name='username']")).isSelected() |
| navigate().back() | Navigate the browser to the previous page | driver.navigate().back() |
| navigate().forward() | Navigate the browser to the next page | driver.navigate().forward() |
| navigate().refresh() | Refresh the browser | driver.navigate().refresh() |
| Site | Notes |
|---|---|
| http://the-internet.herokuapp.com/ | Contains a variety of UI scenarios |
| https://www.saucedemo.com/ | eCommerce demo with login, cart & checkout |
| http://automationpractice.com/ | eCommerce practice site |
| https://www.techlistic.com/p/selenium-practice-form.html | A practice form with many different elements |
| https://phptravels.com/demo/ | Travel demo site with several scenarios |
| Site |
Notes |
|---|---|
| Selenium Automation Frameworks | Course with an overview of Selenium in Ruby, Node.js & Java |
| Selenium Page Objects & Automation | Course covering page object design & abstraction |
| Selenium Support Classes | Course covering the support classes of WebDriver |
| Selenium Synchronization Strategies | Course covering various strategies for WebDriver synchronization |