-
Notifications
You must be signed in to change notification settings - Fork 31
Naming convention
Page class name should end with 'Page' word e.g. HomePage, LoginPage, SettingsPage.
Block class name should end with 'Block' word e.g. LoginFormBlock, AuthorListBlock, ChangePasswordWindowBlock.
For better reusability and understandability of a code, it is recommended to stick to a limited number of keywords to start method names with.
-
All click methods should start with a word 'click' and clearly define an object being clicked e.g. clickLoginButton, clickUserLink, clickHeader.
-
All input text methods should start with a word 'input' and clearly define an object being input e.g. inputFirstName, inputPassword, inputAnyNumber.
-
All select methods should start with a word 'select' and clearly define an object being selected e.g. selectFirstOption, selectCountry, selectRandomYear.
- All check methods should start with a word 'check' and clearly define what is being checked e.g. checkFirstName, checkImageIsLoaded, checkHeaderText.
All checks that verify that some element is visible on the screen should be named using the following pattern: check{specify_element}IsDisplayed e.g. checkLoginButtonIsDisplayed, checkUserLinkIsDisplayed.
- All block methods should start with a word 'get' and end with a word 'Block' and clearly define what block is being returned e.g. getLoginBlock, getHeaderBlock.