[Arabic] Robot Framework Beginner Tutorial 7 - Summary Example
Автор: Coding in Arabic
Загружено: 2025-12-21
Просмотров: 6
Описание:
#testcases #test #testingautomation #selenium #webautomation #webtesting #paython
** Settings **
Documentation A comprehensive suite covering all Robot Framework concepts.
Library SeleniumLibrary
Test Setup Open Application To Login Page
Test Teardown Close Browser
Force Tags Full_Suite
** Variables **
${URL} https://practicetestautomation.com/pr...
${BROWSER} Chrome
${VALID_USER} student
${VALID_PASS} Password123
** Keywords **
Open Application To Login Page
Open Browser ${URL} ${BROWSER}
Maximize Browser Window
Submit Login Form
[Arguments] ${username} ${password}
Input Text id=username ${username}
Input Text id=password ${password}
Click Button id=submit
** Test Cases **
-- ORIGINAL TESTS --
Verify Successful Login
[Documentation] Positive Test: Checks if a valid user can log in.
[Tags] Smoke Login
Submit Login Form ${VALID_USER} ${VALID_PASS}
Page Should Contain Logged In Successfully
Verify Invalid Login Error
[Documentation] Negative Test: Checks error handling for wrong credentials.
[Tags] Regression Login
Submit Login Form incorrect_user incorrect_pass
#Element Should Be Visible id=error
Page Should Contain Your username is invalid!
Verify Logout Functionality
[Documentation] Functional Test: Checks if the logout button works after login.
[Tags] Regression Logout
Submit Login Form ${VALID_USER} ${VALID_PASS}
Click logout link (Library Keyword)
Click Link xpath=//a[text()='Log out']
Verify we are back at the login page
Element Should Be Visible id=submit
Page Should Contain Test login
Verify Logo Visibility
[Documentation] UI Test: Checks if the main logo is displayed on the page.
[Tags] UI
Verify the image exists using an image locator or ID
Element Should Be Visible css=img.custom-logo
Log To Console UI Check: Logo is visible.
Verify Login With Empty Fields
[Documentation] Negative Test: Checks what happens when no data is entered.
[Tags] Regression Login
Just click submit without calling the 'Input' keywords
Click Button id=submit
Verify error message appears
Element Should Be Visible id=error
Log To Console Negative Check: Empty fields handled.
Created By : Hussein Mikawi
Email : [email protected]
Phone : +201100757603
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: