Set up Selenium Automation Testing with JavaScript + Node.js + Visual Studio Code

Поділитися
Вставка
  • Опубліковано 13 гру 2023
  • Welcome to our tutorial on Selenium Automation Testing with JavaScript. In this video, we show how to step by step implement Selenium Automation Testing with JavaScript, Node.js, Visual Studio Code.
    Unlock the power of Selenium Automation Testing with this in-depth tutorial. Focused on JavaScript and Node.js users, this video guides you through setting up and executing automated tests in Visual Studio Code. Whether you're new to automation testing or looking to refine your skills with Selenium, this tutorial is designed to provide you with practical insights and hands-on examples.
    Content:
    Getting Started:
    Introduction to Selenium and its importance in web automation testing.
    Overview of the tools: JavaScript, Node.js, and Visual Studio Code.
    Environment Setup:
    Installing Node.js and Visual Studio Code.
    Setting up Selenium WebDriver for JavaScript.
    Writing Your First Test:
    Creating a simple Selenium test script in JavaScript.
    Running your test in different browsers.
    Working with Web Elements:
    Identifying web elements using Selenium.
    Performing actions like click, input text, and handling alerts.
    Advanced Test Scenarios:
    Implementing Page Object Models for scalable test scripts.
    Data-driven testing with Selenium and JavaScript.
    Debugging and Troubleshooting:
    Tips for debugging your Selenium tests in Visual Studio Code.
    Common issues and how to solve them.

КОМЕНТАРІ • 20

  • @user-dq2qe4hr7v
    @user-dq2qe4hr7v 6 місяців тому

    Thank you so much! Thanks to your video, I was finally able to launch a new project specifically for testing. Looking forward to new videos. Best of luck in your endeavors!

    • @testautomation999
      @testautomation999  6 місяців тому

      Thank you very much!

    • @testautomation999
      @testautomation999  Місяць тому

      Thanks. I check my the previous project. I can run without error. PS C:\Users\luluk\Documents\video-test> npx mocha home.spec.js
      0 passing (1ms)
      DevTools listening on ws://127.0.0.1:65015/devtools/browser/d58a9582-575c-49ad-b5d8-f803025b2287
      *******Home page title ******* Home Page - Admlucid
      ******Current URL****** admlucid.com/
      ******Page Header******* Selenium Automation Testing
      PS C:\Users\luluk\Documents\video-test> . You may check your environment.

  • @user-wi9qx7md7l
    @user-wi9qx7md7l 6 місяців тому

    thanks alot.
    question in the result it showing 0 passing. how we can get the actual if it all passed. and show case is passed ex: home spec passed

    • @testautomation999
      @testautomation999  6 місяців тому

      If we want to have not 0 passing, we need to re-structure our tests as:
      describe("ADM Tests", () => {
      it("Go Home", async function(){
      });
      it("Go Golf" ,async function(){
      });
      });
      Thank you for the comments!
      ADM Tests
      ✔ Go Home
      ✔ Go Golf
      2 passing (5ms)

  • @cirodirosa6752
    @cirodirosa6752 6 місяців тому

    Looks like I'm missing something. I can't seem to get the Chromedriver to work.
    npx mocha home.spec.js
    Error: Unable to obtain browser driver.
    Any suggestions? Thanks!

    • @testautomation999
      @testautomation999  6 місяців тому

      Not sure which steps may be missed. May check codes.

    • @cirodirosa6752
      @cirodirosa6752 6 місяців тому

      @@testautomation999
      Thank you for replying.
      I can start and stop the chromedriver on a separate require js
      But, executing your example js with the selenium-driver.. no luck
      Error: Unable to obtain browser driver.😔

    • @milyoszw
      @milyoszw 4 місяці тому

      for me worked npm install mocha

  • @thanhproo1412
    @thanhproo1412 3 місяці тому

    Hi there , thank you so much for this informative video! What other resources would you suggest to learn more and improve my skills in automation testing?

    • @testautomation999
      @testautomation999  3 місяці тому +2

      Thank you very much! It's our pleasure, our videos are informative. I suggested other skills in automation testing maybe API test, Load/Performance test, as UI automation testing we only introduced Selenium, other automation UI testing such as Cypress we will introduce later.

  • @user-ir7cv6fb7e
    @user-ir7cv6fb7e 2 місяці тому

    With this shall we launch desktop applications?

    • @testautomation999
      @testautomation999  2 місяці тому

      You need to download and install Visual Studio Code and Node.js, then you can write selenium scripts in JavaScript. Do I answer your question? Thanks.

  • @matthinchcliffe6158
    @matthinchcliffe6158 2 місяці тому

    Can I do this with VS instead of VS Code?

    • @testautomation999
      @testautomation999  2 місяці тому

      This case we used VS Code with JavaScript, if you setup JavaScript with VS, it will be OK.

  • @FloStudios
    @FloStudios 4 місяці тому

    Why mocha rather than just running the code with node?

    • @testautomation999
      @testautomation999  4 місяці тому

      Just use mocha test framework. It may run in node or other test framework. Thanks.

  • @KhBlog24
    @KhBlog24 Місяць тому

    please tell me how to solve the error "Error: Unable to obtain browser driver."

    • @testautomation999
      @testautomation999  Місяць тому

      Thank you! You may check install selenium-webdriver, and make sure installation successfully.

    • @Gaimo_
      @Gaimo_ Місяць тому

      I have the same problem after building my application, how do I solve it? It works in the test environment, but after building it doesn't.