This is a project where the practical classes of the Automation Testing Masterclass are implemented.
- Kickoff:
- Actions:
- GetText How to get the text of a web element.
- ClickOnElement How to click on a button.
- SendText Example of how to write text in an input field.
- WorkWithTables How to get info from a table.
- SelectExample How to select an option from a Select component.
- ActionsExample How to perform actions as drag and drop elements, do a right click.
- Waits:
- WaitTypes Different types of waits.
- JavaScriptExecutor:
- JavascriptExecutorExamples Some examples about executing javascript code.
- Alerts:
- Alerts Example about how to handler alerts.
- iFrames:
- WorkWithIframes How to work with iFrames.
To organize the project structure, the creation of the WebDriver is implemented in a utility class, alongside the Wikipedia URL that is used in many examples.
public static final String WIKIPEDIA_URL= "https://www.wikipedia.org/";
public static WebDriver getDriver() {
WebDriver driver = new ChromeDriver();
System.setProperty("webdriver.chrome.driver", "chromedriver");
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10));
driver.manage().window().maximize();
return driver;
}
This is a PDF with some notes and examples, it is pretty much the same content.