Skip to content

3e6pa117/java-test-automation

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Low-code Test Automation Framework

Framework for teaching the basics of low-code automation on projects of the Czechitas Digital Testing Academy.

In its default state, after launching, the framework should start a web browser you have installed, without the need to download additional drivers. The assumption is that the user has one of the following web browsers installed: Firefox, Chrome, or Edge.

A sample test in the ExampleTest class will open a web browser and verify that the address www.czechitas.cz is present in the contacts section of the testing application.

Hierarchy of Elements

Working with the framework is divided according to elements of the testing application as follows:

ApplicationAction - Allows you to work with application list:

  • clickCreateNewApplicationButton() - click on create new application button
  • selectProgrammingSection() - select Programming course category
  • clickCreatePythonApplicationButton() - create a new application once programming category is selected
  • openFirstApplicationDetailsPage() - open an existing application to see details
  • search("Jan") - search for an application from Jan
  • clickEditFirstApplicationButton() - open the first application to edit details

ApplicationDetail - Allows you to work with application details page:

  • selectTerm(String term) - select a term
  • insertStudentFirstName("Jan") - insert student first name
  • insertStudentLastName("Novak") - insert student first name
  • insertBirthdate("01.01.2000") - insert student day of birth
  • insertNote("my personal note") - insert a note
  • selectCashPaymentMethod() - choose cash payment method
  • selectBankTrasnferPaymentMethod() - choose bank transfer payment method
  • selectSlipPaymentMethod() - choose slip payment method
  • selectFKSPPaymentMethod() - choose FKSP payment method
  • clickAcceptTermsCheckbox() - accept Terms and Conditions
  • clickEditApplicationButton() - save changes upon editing an application
  • clickCreateApplicationButton() - click the button to create an application once all the details are provided
  • clickHealthDisabilityCheckbox() - click on checkbox for health disability
  • insertHealthDisabilityNote() - insert a note for health disability

InternalMenuAction - Allows you to work with internal menu upon logging in:

  • goToOrdersSection() - go to Objednavky section
  • goToTermsSection() - go to Terminy section
  • goToApplicationsSection() - go to Prihlasky section
  • goToCategoriesSection() - go to Kategorie section
  • goToNewsSection() - go to Aktuality section
  • goToExportsSection() - go to Exporty section

LoginAction - allows you to login and logout:

  • clickLoginMenuLink() - click login link in top menu (top right corner)
  • insertEmail("test@czechitas.cz") - insert email
  • insertPassword("mySecurePass123") - insert password
  • clickLoginButton() - click login button once credentials are provided
  • logout() - logout
  • clickRegisterButton() - click register button

RegistrationAction - allows you to register:

  • insertFirstAndLastName("John", "Doe") - insert first and last name in the registration form
  • insertEmail("john.doe@test.cz") - insert email in the registration form
  • insertPassword("Password123") - insert password in the registration form
  • insertPasswordConfirmation("Password123") - insert password confirmation in the registration form
  • clickRegisterButton - click register button to submit the form

ProfileAction - allows you to work with customer profile:

  • goToProfilePage() - open profile page from top menu
  • insertPassword("new password") - enter a new password. Change "new password" to the one you like based on security requirements (lowercase and uppercase letters, numbers, etc)
  • insertPasswordVerification("new password") - enter a password to confirm
  • clickChangeButton() - click the button to save changes

PublicMenuAction - allows you to work with top level menu in page header:

  • goToContactsSection() - go to Kontakt section
  • goToHomePage() - go to Domu page
  • goToInstructionsAndFormsForTeacherSection() - go to Navody a Formulare pro ucitele
  • goToKindergartenAndSchoolSection() - go to Objednávka pro MŠ/ZŠ
  • goToInstructionsAndFormsForParentSection() - go to Navody a Formulare pro rodice
  • goToCreateApplicationSection() - create an application from top header menu (Pro rodice -> Vytvorit prihlasku)

OrderAction - allows you to work with the order page:

  • search("Jan") - search for an order from Jan
  • clickAddButton() - click the button to add a new order

OrderDetailsAction - allows you to work with the order detail page:

  • insertICO("1234567") - insert ICO into IČO field
  • insertClient("Odberatel") - insert a client name into Odběratel field
  • insertFullAddress("Adresa") - insert a full address into Úplná Adresa field
  • insertSubstitute("Jmeno") - insert a substitute name into Zastoupena - ředitel(ka) školy
  • insertContactPersonNameAndSurname("name", "surname") - insert a contact person name and surname into Jméno a příjmení
  • insertContactPersonTelephone("+420777888999") - insert a contact person telephone into Telefon
  • insertContactPersonEmail("email@test.cz") - insert a contact person email into Email
  • insertStartDate("01.01.2026") - insert a start date into Upřednostňovaný termín 1
  • insertEndDate("10.01.2026") - insert a end date into Upřednostňovaný termín 1
  • selectForenoonSuburbanCampVariant() - select a Dopolední suburban camp variant in the Kurz field
  • selectAfternoonSuburbanCampVariant() - select a Odpolední suburban camp variant in the Kurz field
  • insertChildrenCountToSuburbanCamp(5) - insert a number of children to the Počet dětí field
  • insertChildrenCountToSchoolInNature(5) - insert a number of children to the Počet dětí field
  • insertInAgeToSuburbanCamp(15) - insert an age of children to the Ve věku field
  • insertInAgeToSchoolInNature(15) - insert an age of children to the Ve věku field
  • insertAdultsCountToSuburbanCamp(2) - insert a number of adults to the Počet pedagogického doprovodu field
  • insertAdultsCountToSchoolInNature(2) - insert a number of adults to the Počet pedagogického doprovodu field
  • saveSuburbanCampOrder() - save the suburban camp order
  • saveSchoolInNatureOrder() - save the school in nature order
  • insertStartTime("12:00") - insert a start time into Nástup field
  • selectBreakfastStartToSchoolInNature() - select Snídaní in the Strava začíná field
  • selectLunchStartToSchoolInNature() - select a Obědem suburban camp variant in the Strava začíná field
  • selectDinnerStartToSchoolInNature() - select a Večeří suburban camp variant in the Strava začíná field
  • insertEndTime("20:00") - insert a end time into Ukončení field
  • selectBreakfastEndToSchoolInNature() - select a Snídaní suburban camp variant in the Strava končí field
  • selectDinnerStartToSchoolInNature() - select a Večeří suburban camp variant in the Strava končí field
  • selectDinnerStartToSchoolInNature() - select a Večeří suburban camp variant in the Strava končí field

Assertions

Application list - verification steps you can do on the application list view

  • checkColumnExists("Akce") - check if Akce column is visible on the page
  • checkApplicationsTableIsEmpty() - ensure the application list is empty (Žádné záznamy nenalezeny message is displayed)
  • checkNumberOfApplications(5) - ensure the application list has exactly 5 applications

Application detail view - verification steps you can do on the detail view

  • checkPaymentMethod("Bankovní převod") - ensure the application is paid through a bank transfer
  • checkFirstName("Jan") - check that the student first name is Jan
  • checkLastName("Novak") - check that the student first name is Novak
  • checkDateOfBirth("01.01.2010") - check that the student date of birth is 01.01.2010
  • checkNote("myPrivateNote") - check that the note is myPrivateNote
  • checkRemainingAmountToPay("100.00") - check that remaining amount to pay is 100.00
  • checkTerm("05.02. - 09.02.2024") - check that the term is 05.02. - 09.02.2024
  • checkMessageContainsStudentLastName("Novak") - ensure that Zpráva pro příjemce contains student last name Novak
  • checkHealthDisabilityNote("Note") - ensure that Zdravotní omezení contains health disability note Note

Order list - verification steps you can do on the order list view

  • checkOrdersTableIsEmpty() - ensure the orders list is empty (Žádné záznamy nenalezeny message is displayed)
  • checkNumberOfOrders(5) - ensure the orders list has exactly 5 orders

Login & Registration - verification steps you can do on the login and registration page

  • checkUserIsLoggedIn("Novak") - ensure that the user is logged in and the name is Novak
  • checkUserIsNotLoggedIn() - ensure that the user is not logged in

General Assertions - verification steps you can do on any page

About

Low-code automation framework for education purpose

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Java 100.0%