Back to Browse

[Arabic] Robot Framework Beginner Tutorial 5 - How to Use Setup and Teardown

60 views
Dec 21, 2025
15:14

#testcases #test #testingautomation #selenium #webautomation #webtesting #paython Setup (التهيئة): Actions performed before the test starts (e.g., Opening the browser, logging in). Teardown (التنظيف): Actions performed after the test finishes (e.g., Closing the browser, taking a screenshot, logging out). -Suite Setup / Suite Teardown: Runs once at the very beginning and once at the very end of the whole file. -Test Setup / Test Teardown: Runs before and after every single test case in the file. *** Settings *** Library SeleniumLibrary # This will run before EVERY test case Test Setup Open My Website # This will run after EVERY test case (even if they fail!) Test Teardown Close Browser *** Variables *** ${URL} file:///C:/Hussein/RFW_Tutorial/Robot Framework/login_page.html ${BROWSER} Chrome *** Test Cases *** Valid Login Test [Documentation] Checking login with correct credentials Input Text id=username_input RobotTester Input Text id=password_input Test1234 Click Button id=login_button Page Should Contain Welcome, RobotTester! Invalid Login Test [Documentation] Checking login with wrong credentials Input Text id=username_input RobotTester Input Text id=password_input Test1234 Click Button id=login_button Page Should Not Contain Welcome *** Keywords *** Open My Website Open Browser ${URL} ${BROWSER} Maximize Browser Window Created By : Hussein Mikawi Email : [email protected] Phone : +201100757603

Download

1 formats

Video Formats

360pmp415.2 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

[Arabic] Robot Framework Beginner Tutorial 5 - How to Use Setup and Teardown | NatokHD