๐ฅ๐ Here, you'll discover code from our educational YouTube videos that swiftly guide you through Playwright. It's a fantastic opportunity for beginners in programming and test automation to see Playwright in action! Perfect for those just starting their coding journey or looking to dip their toes into the world of automated testing. ๐๐ฉโ๐ป
๐ก Why Playwright? Playwright enables the automation of web browser interactions across different platforms, making it the perfect tool for developers and QA engineers looking to craft seamless testing experiences. ๐โจ
Each example is hosted in its branch. ๐ฑ To dive into an example that interests you, you'll first need to clone the repository ๐ and switch to the branch containing the example you wish to explore. ๐ It's like a treasure hunt in the world of coding! ๐ต๏ธโโ๏ธ
๐ฅ How to Install VSCode
๐ Seek out the official Visual Studio Code website and claim the version meant for your realm (operating system). ๐ฆ Open the downloaded artifact and adhere to the guidance of the installation spirit.Open the terminal and paste the next line of code there.
node -v
npm -v๐ฎ Press Enter!
If they are installed, you will see the version of each of the Node and npm, and you can move forward!
If not, below are the instructions on how to install them! ๐
๐ How to install Node.js!
๐ฐ Venture forth to the official Node.js website and secure the Windows installer treasure. ๐ Open the treasure chest (the downloaded file) and follow the mystical instructions provided by the installer.node -v
npm -v๐ฎ Press Enter! ๐ To witness the versions of Node.js and npm materialize before your eyes.
๐งโโ๏ธ๐instruction how to install git - A magical guide to begin your journey into the Git realm.
When git is installed ๐: Open GitBash or Vscode in the folder where you wish to welcome the repository. ๐ And type the command below and press enter ๐:
git clone https://github.com/engenious-inc/playwright-examples.gitThis incantation ๐ clones the repository into your chosen folder, opening a portal ๐ to endless possibilities.
๐ Switching Branches: After cloning the repository, use the following commands in your terminal to switch to the branch of interest:
- List all branches:
git branch -a- Switch to your desired branch:
git checkout <branch-name>Replace with the branch name you want to explore. This magical step will transport you ๐ to that branch, where you'll find all the relevant code and instructions for that specific example.
๐ Open VSCode and the folder where you installed the repository. Then, in the terminal type:
npm installThis incantation reads the package.json scroll and summons all the dependencies listed there.
๐ฅ With our tools by our side, it's time to bring our code to life! Let's awaken the Playwright tests by typing
npx playwright test --headed๐ As the dust settles, your terminal will reveal the outcomes of your quest. The playwright will share tales of which tests conquered the challenges and which faltered.
You've navigated the path of cloning a repository, ventured through folders, armed yourself with dependencies, and triumphed in the Playwright trials. This journey is a splendid first step into the realms of coding and test automation.
๐ค๐ Thank you for joining us on this exciting journey! Don't forget to subscribe to our YouTube channel for the latest updates and educational content. Together, let's unlock the mysteries of code and automation! ๐๐ฉโ๐