Playwright with Javascript | How To Create and Run Tests | Part 3

Поделиться
HTML-код
  • Опубликовано: 24 май 2023
  • Step 1 - Create a new file under test folder
    Step 2 - Add module ‘playwright/test’
    const { test, expect } = require('@playwright/test');
    ** test, expect ------ functions from @playwright/test module
    Playwright Test provides a test function to declare tests and expect function to write assertions
    Step 3 - Create a test block - test(title, testFunction)
    The keyword 'async' before a function makes the function return a promise
    The keyword 'await' before a function makes the function wait for a promise
    Step 4 - Run the test
    npx playwright test --project=chromium --headed FirstTest.spec.js
    npx playwright test runs all tests on all browsers in headless mode
    npx playwright test MyTest1.spec.js runs a specific test file
    npx playwright test MyTest1.spec.js MyTest2.spec.js runs the files specified
    npx playwright test -g "test title" runs test with the title
    npx playwright test --project=chromium runs on specific browser
    npx playwright test --headed runs tests in headed mode
    npx playwright test --debug debug tests
    npx playwright test example.spec.js --debug debug specific test file
    #########################
    Udemy Courses:
    #########################
    Manual Testing+Agile with Jira Tool
    *********************************
    ► shorturl.at/xNXZ4
    Selenium with Java+Cucumber
    *****************************
    ► shorturl.at/aIKMW
    Selenium with Python & PyTest
    *****************************
    ► shorturl.at/ELW09
    Selenium with python using Robot framework
    ************************************
    ► shorturl.at/bcDPZ
    API Testing(Postman, RestAssured & SoapUI)
    ************************************
    ► shorturl.at/uAWY7
    Web & API Automation using Cypress with Javascript
    ***********************************
    ► rb.gy/4uum2n
    Playwright with Javascript
    ***********************
    ► shorturl.at/gALZ1
    Jmeter-Performance Testing
    ************************
    ► rb.gy/ocj7r2
    SDET Essencials(Full Stack QA)
    *************************
    ► rb.gy/hlnf2v
    Appium-Mobile Automation Testing
    *****************************
    ► rb.gy/wmzv64
    Java Collections
    *****************
    ► bit.ly/3S66ezE
    Python Programming
    *********************
    ► urlis.net/gdsfpb0s
    Cucumber BDD Framework
    ****************************
    ► bit.ly/3F7d69r
    Protractor with Javascript
    ***************************
    ► urlis.net/4uddm1qb
    ####################################
    RUclips Playlists:
    ####################################
    Manual Testing & Agile
    *******************
    ► bit.ly/3ujvaYa
    ► bit.ly/3OYzxQj
    SQL
    ****
    ► bit.ly/3R6XjeG
    ► bit.ly/3nE0a1s
    ► bit.ly/3IeKuuJ
    linux & Shell Scripting
    ******************
    ► bit.ly/3up1Z6a
    ► bit.ly/3nzvGxx
    Java
    *****
    ► bit.ly/3R9QfOs
    ► bit.ly/3AoRMKM
    ► bit.ly/3IbTTDn
    ► bit.ly/3ybXInv
    ► bit.ly/3yCoHdw
    Selenium With Java+Cucumber
    ********************************
    ► bit.ly/3P2FMm4
    ► bit.ly/3yhiIt4
    ► bit.ly/3uokzet
    ► bit.ly/3a7XIND
    ► bit.ly/3umN2S9
    ► bit.ly/3aar7GW
    ► bit.ly/3y9kD2S
    ► bit.ly/3uhLskn
    Python
    *******
    ► bit.ly/3agNgU0
    ► bit.ly/3NJNnoy
    ► bit.ly/2CTQ4mR
    ► bit.ly/3OIYWh1
    Selenium With Python,Pytest&Behave
    ***************************************
    ► bit.ly/3OHHoC9
    ► bit.ly/3IeNLdv
    ► bit.ly/2J4tPeT
    ► bit.ly/3ydSkAq
    Selenium With Python Using Robert Framework
    (Web&API Testing)
    *************************************************
    ► bit.ly/3nUvlpr
    ► bit.ly/3nUvE3z
    API Testing (Postman,SoapUi,&Rest Assured)
    **********************************************
    ► bit.ly/3OXacWY
    ► bit.ly/3yh0UhE
    ► bit.ly/3nC9DWQ
    ► bit.ly/3yGfhNS
    ► bit.ly/3OJa11H
    ► bit.ly/3P2slCC
    Mobile App Testing Appium
    ****************************
    ► bit.ly/3Al49HG
    Performance Testing Jmeter
    *******************************
    ► bit.ly/3nz4fE7
    Maven,Jenkins,Git,Github,CI/CD
    *******************************
    ► bit.ly/3P16HPj
    ► bit.ly/3yhlUVA
    ► bit.ly/3afYfwT
    ► bit.ly/3yGzweG
    ► bit.ly/3yF73Ws
    ► bit.ly/3NCOmH7
    SQL,DB Testing&ETL,Bigdata
    *******************************
    ► bit.ly/3NKOcNY
    ► bit.ly/3OVpDyI
    ► bit.ly/3NEvUy0
    ► bit.ly/3IryxlT
    ► bit.ly/3RkWBLh
    JavaScript Based Automation Tools
    ********************************
    ► bit.ly/3nUx51X
    ► bit.ly/3AqI6Q0
    ► bit.ly/3yeurbT
    ► bit.ly/3ujzpTK
    Selector Hub Tools
    ********************
    ►rb.gy/h3h424
    GraphQL
    *********
    ► rb.gy/sj3gys
    Cypress API Testing
    ********************
    ► shorturl.at/fjKPX
    Cypress Web Testing
    **********************
    ► shorturl.at/agjlK
    Playwright with Javascipt
    *********************
    ► shorturl.at/adSTY

Комментарии • 59

  • @SlickNik305
    @SlickNik305 3 месяца назад +3

    Clear, precise and thorough. You are a born teacher! Thanks so much from 🇬🇧

    • @sdetpavan
      @sdetpavan  3 месяца назад +1

      Glad it was helpful!

  • @annb-ku1qu
    @annb-ku1qu Год назад +1

    Very affordable and interesting training. The tool looks promising. It has a lot of modern solutions that were missing in Selenium.

  • @gurudattv9567
    @gurudattv9567 Год назад +4

    Awesome as always. Best one on RUclips for playwright. You make nothing complex.

  • @Vineetkumar-hu2cs
    @Vineetkumar-hu2cs 9 месяцев назад +2

    Awesome playlist on playwright you are really awesome sir. Kindly add API testing too

  • @user-iy3ek1lj8c
    @user-iy3ek1lj8c 9 месяцев назад +1

    This is great training. Very helpful and informative. Easy to understand

  • @user-vm1xz1kl1i
    @user-vm1xz1kl1i 7 месяцев назад +1

    Thank you very much! The content is incredibly valuable and informative. I would greatly appreciate it if you could create a new course on building an automation framework in Playwright

  • @user-rp2vp8ir7t
    @user-rp2vp8ir7t 11 месяцев назад +2

    Thanks sir for awesome tutorial . All i can say is you are doing a great job .
    Explanation is so much in detail :)

    • @sdetpavan
      @sdetpavan  11 месяцев назад +1

      You are most welcome

  • @sanjeebdash1112
    @sanjeebdash1112 11 месяцев назад +4

    Love you, sir, really you are doing a great job for our IT students.

    • @sdetpavan
      @sdetpavan  11 месяцев назад +1

      It's my pleasure

    • @CodeWithMuhammadAhsan
      @CodeWithMuhammadAhsan 10 месяцев назад

      love from Pakistan, just start watching these videos, it will help me setup it in our existing project and understand playwright better @@sdetpavan

    • @pranjalbhatia9116
      @pranjalbhatia9116 9 месяцев назад

      @@sdetpavanhello Sir, nice videos, is there a possibility where we need to join some other live classes to become expert in playwright?

  • @maheshkumar-zw5nt
    @maheshkumar-zw5nt Год назад +1

    Hi pavan, I understood a lot in these videos.

  • @SineQuaNon1
    @SineQuaNon1 Год назад +1

    Thanks. Great video, as always.

  • @manjumaher402
    @manjumaher402 4 месяца назад +1

    So helpful. Thanks for sharing.

    • @sdetpavan
      @sdetpavan  4 месяца назад

      You are so welcome!

  • @user-vj5up9cw4d
    @user-vj5up9cw4d Год назад +1

    Thanks sir.. I really like your Presentation skill..

  • @sanjeev8720
    @sanjeev8720 Год назад +1

    Thank you so much sir by seeing this video I have learnt how to do debug functionality

  • @senQA369
    @senQA369 Месяц назад +1

    Thankyou Sir. Very helpfull.

  • @jointeravr7207
    @jointeravr7207 10 месяцев назад +1

    Very Helpful Love hearty ♥️♥️♥️🧡💟🙏🙏🙏

  • @dinarshafikov2207
    @dinarshafikov2207 3 месяца назад +1

    thanks for your job. Its a big deal

    • @sdetpavan
      @sdetpavan  3 месяца назад

      It's my pleasure

  • @venkatk2738
    @venkatk2738 26 дней назад +1

    Excellent

  • @padmajashitole5077
    @padmajashitole5077 Год назад

    I wish u make a one more playlist for playwright with typescript.

  • @sumitgoyal385
    @sumitgoyal385 11 месяцев назад +2

    there should be await keyword placed before page.title() as title method returns Promise

  • @DIVYANSHU267
    @DIVYANSHU267 Год назад

    Thanks sir, will you also cover API testing ?

  • @orpearnav7260
    @orpearnav7260 Год назад +1

    Thank you

  • @chanduaddanki2954
    @chanduaddanki2954 Год назад +1

    Thank you Sir❤

  • @theVicharakAus
    @theVicharakAus 27 дней назад

    Sir, i am currently using codecept framework with playwright in my organisation, I do not see videos on same as yours. I see few areas are different in that when I compare with your videos.. Please prepare videos on it in future

  • @murathp07
    @murathp07 3 месяца назад

    Hi Pavan. Thank you for making a very good video. I have one question thought, why playwright tests have to be called .spec. ?

  • @damayanthitkg8468
    @damayanthitkg8468 Год назад

    Hi, I'm using playwright test runnner for running the tests. It was running all the test folders in parallel .But now it is only running one test folder at a time. How to run all the test folders in parallel?
    Thanks in advance

  • @irwansyarifudin1304
    @irwansyarifudin1304 Месяц назад

    awesome

  • @ushabv9382
    @ushabv9382 Год назад +1

    Can you pls prepare playwright with typescript series as my project is about to start with this. Pls consider my request sir

  • @rahulpatidar5285
    @rahulpatidar5285 Год назад

    Hello sir, How to do POST API call for form data(txt/xml file)? can you please suggest

  • @gautamithota
    @gautamithota 6 месяцев назад

    Hi , Followed your videos and created in the sameway.but still my HomePageTest.spec.js is not running .only example file is running.Can you please help me

  • @bhamkarthik1264
    @bhamkarthik1264 2 месяца назад

    Could you make video on automating webapp using WebView2 in playwright

  • @DIVYANSHU267
    @DIVYANSHU267 Год назад

    plz add commands in description

  • @NarendraKumarBilla
    @NarendraKumarBilla 2 месяца назад

    Hi Sir, I'm getting this error while executing the playwright tests.
    1. Error: browserType.launch: Executable doesn't exist at C:\Users\billa\AppData\Local\ms-playwright\firefox-1447\firefox\firefox.exe.
    2. Error: browserType.launch: Executable doesn't exist at C:\Users\billa\AppData\Local\ms-playwright\webkit-1992\Playwright.exe
    Can you please help me out.

  • @user-vw7ru9yt6t
    @user-vw7ru9yt6t Год назад

    Sir please help me. While trying i am getting "No tests found"

  • @1988virgil
    @1988virgil 3 месяца назад

    @sdetpavan how do we skip windows authentications

  • @user-re8ur6gd9p
    @user-re8ur6gd9p Месяц назад

    Hello sir kindly sort my this issue
    I am working on PLaywright but i feel that the test excution speed is too fast some times i am in headed mode i am unable to verify this that the action is performed or not
    i have to verify this from report
    kindly suggest me the that method ; whom my scripts not affected or fail
    because right scripts are working but due to this issue i am finding any solution

  • @manoharch1203
    @manoharch1203 5 месяцев назад

    Hi Sir, Can you create Jenkins videos with the latest Version.

  • @venkatg8414
    @venkatg8414 Месяц назад

    Page is getting closed even page.close() is not used

  • @dieuvanbui8591
    @dieuvanbui8591 2 месяца назад

    Please Can you share the Git link for me!

  • @krishnamurari2284
    @krishnamurari2284 Год назад

    Getting error test is not defined

  • @raviteja-qk3br
    @raviteja-qk3br 9 месяцев назад

    Hi sir, we want c#

  • @Ruslan-ps9rz
    @Ruslan-ps9rz Год назад

    please add russian subtitles