Lexxx42 / pytest-playwright

UI autotest using Pytest and Playwright

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pytest-playwright


UI autotest using Pytest and Playwright


Tools used:


How to use this project

  1. Install Google Chrome browser
  2. Install requirements
  • If you use Windows install requirements with the following command:
pip install -r requirements.txt
  • If you use Linux install requirements with the following command:
+ pip3 install -r requirements.txt
  1. Registrate on Qase.io TMS (Test Management System)
  1. Create new project GoogleSearch

creation of project on the platform

  1. Create new suite Index Page

creation of test suite

  1. Test suite Index Page is a representation of the main Google page

google main page

  1. Lets check that main search button have the text Google Search
  • Create test case in the Index Page suite

creation of test case

+ Use the following command to download new browsers:
playwright install
  • Use the following command to run autotests:
pytest .
  • You can find the locator for the 1st test case on the index page
    • Use F12 button to open DevTools
    • usin dev tools on the button
    • button html code
    • We need to find locator for the button
    • CSS:
    [data-ved="0ahUKEwj-7OLupaf9AhV4Q_EDHQPUDysQ4dUDCBA"]
    
    • XPATH:
    //div[@class='FPdoLc lJ9FBc']//input[@name='btnK']
    

Source: Stepushchenko

About

UI autotest using Pytest and Playwright

License:MIT License


Languages

Language:Python 100.0%