Testing the authorization on Yandex with existing input data using Selenium
JDK v.16.0.2, Selenium Server (Grid) v.4.1.2, Webdriver for Chrome v.99.0.4844.51, ChroPath v.6.1.12, IntelliJ IDEA v.2021.3.2. OS: Windows 10 Pro
This simple autotest serves to imitate user activity:
- Opening Yandex authorization page in Chrome
- Inputing positive and existing data
- Switching to user profile menu (user icon) and loging out
This autotest is written as a Maven project, uses TestNG annotations. There are three Java classes: LoginTest, LoginPage, ProfPage. See their description below.
| Name | Description |
|---|---|
LoginPage |
Contains @FindBy annotations that provide search of element (login and password fields, login button) by XPath.Describes methods inputLogin, inputPassword,clickButton |
ProfPage |
Contains @FindBy annotations that provide search of element (user profile menu, logout button) by XPath.Describes methods entryMenu,userLogout |
LoginTest |
Contains @Test,@BeforeClass and @AfterClass annotations. The @BeforeClass sets chromedriver, launches Chrome and after preparing the window switches to the Yandex authorization page |
"Сhrome browser is controlled by automated test software"
- Java classes. Links: LoginPage class, LoginTest class,
ProfPage class - Chromedriver.exe. Link: Selenium webdriver for Chrome
- POM xml file with added dependencies. Link: Project Object Model xml file