Cypress Complete Beginners Masterclass 1 | Step by Step | Raghav Pal |

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ก.ย. 2024

ความคิดเห็น • 648

  • @sehreenJafry
    @sehreenJafry ปีที่แล้ว +10

    I have to say you are the BEST teacher I have ever learnt from! This was so detailed, but concise, and explained in such a simple way for a newbie like to me to grasp the whole concept really well. Really want to appreciate you on your teaching style and drive.

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว +2

      So happy and humbled to see your message Sehreen. Thanks and best wishes

    • @sehreenJafry
      @sehreenJafry ปีที่แล้ว +1

      Thank you for the best wishes. Please never stop teaching!! ❤️👏

  • @RaghavPal
    @RaghavPal  2 ปีที่แล้ว +27

    Hi Friends, This is a complete beginners full course Cypress Masterclass. I hope this will help you get started with Cypress. Please share with all and let me know if you have any questions

    • @karthikvedula2719
      @karthikvedula2719 2 ปีที่แล้ว +2

      Hi Raghava, I appreciate your Contribution to Software Testing It really inspires us to keep learning new technologies from your tutorials of yours. once again you're coming up with cypress - MasterClass which is a Game Changer automation tool for the Present and future times. Hope many testing Aspirants like me are super excited to learn Test Automation with Cypress. Thanks once again for your contribution to Software Testing Community.

    • @Shahzilrind
      @Shahzilrind 2 ปีที่แล้ว +1

      Please show us latest cypress version as lot of things have been changed in the new version. Regards.
      Shaz

    • @harkeeratkaur8648
      @harkeeratkaur8648 2 ปีที่แล้ว

      Hello i need help for karate framework how i can connect with you

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      can send me your queries

    • @arunyasekar9817
      @arunyasekar9817 2 ปีที่แล้ว

      Hi Raghav, I'm waiting for your cypress-component testing tutorial. Any ideas to post that?

  • @millerb844
    @millerb844 ปีที่แล้ว

    I follow so many tutorials, some - most are painfully long and dry. Raghav you are truly the best!

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Thank you so much 😀

  • @63avtar
    @63avtar ปีที่แล้ว +1

    I scored a 19/20! :) Thank you so much for making these classes available for free, you are an exeptional teacher, very easy to follow along with and your explanations are informative without being too complex. I look forward to finishing this course and checking out some of your other stuff (I'm loking to do your postman course next). Absolute legend!

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว +1

      Thanks a lot for your kind words

  • @shashikiran142
    @shashikiran142 ปีที่แล้ว

    its one of the best tutorials to learn automation.... thankyou

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      You are welcome Shashi

  • @varunksv
    @varunksv 10 หลายเดือนก่อน

    After learning basics i got 10/10. thanks for the detailed information

    • @RaghavPal
      @RaghavPal  9 หลายเดือนก่อน

      Great Varun

  • @anweshkumarnayak2708
    @anweshkumarnayak2708 ปีที่แล้ว

    Thanks Raghav sir, your way of teaching is just amazing. I am learning cypress and new to this tool but your videos are helping me to understand the basic concepts a lot. Thanks for the video.

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      You are most welcome Anwesh

  • @surajkamble3538
    @surajkamble3538 9 หลายเดือนก่อน

    Thank you Raghav sir for this cypress tutorials 🤝💐

    • @RaghavPal
      @RaghavPal  9 หลายเดือนก่อน

      Most welcome Suraj

  • @claywashere9638
    @claywashere9638 6 หลายเดือนก่อน

    Youre The best in what you do For Real

    • @RaghavPal
      @RaghavPal  6 หลายเดือนก่อน

      Thanks a lot

  • @sherylfrancisco9253
    @sherylfrancisco9253 ปีที่แล้ว

    Thank you so much. Very informative
    Quiz 1 = 10
    Quiz 2 = 9

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Great, all the best Sheryl

  • @faisaljayadi1173
    @faisaljayadi1173 5 หลายเดือนก่อน

    My Score 16 , sir after take this masterclass , thanks

    • @RaghavPal
      @RaghavPal  5 หลายเดือนก่อน

      Well done Faisal

  • @mayawalke-u5c
    @mayawalke-u5c ปีที่แล้ว

    Hello Raghav,
    I really like your explanations that you take everything to detail and even a beginner can understand well. And I scored 19 marks in the quiz.

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Great score, keep learning Maya

  • @LiLyOlala
    @LiLyOlala ปีที่แล้ว

    thank you so much teacher, im now able to know very basic of Cypress, I just done the QUiZ and I got 12/20, that was not good score but im keep trying, Thanks again 🙂

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Great, all the best Lily

  • @TheMMakif
    @TheMMakif ปีที่แล้ว

    Thank you so much for excellent lessons and this series is one of the best.👏

  • @giangtran-ml4cf
    @giangtran-ml4cf 2 ปีที่แล้ว

    Thank you. I found many video about cypress testing api but just have older version. Waiting next video..

  • @ravisinghrajpoot3086
    @ravisinghrajpoot3086 2 ปีที่แล้ว +1

    It's always great to watch n learn from you Raghav..QQ What is the major difference in the following commands to open Cypress , like what difference it make
    npx cypress open
    npm run cypress

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      Most welcome Ravi. the 1st command i.e.,
      npx cypress open - opens the cypress app ui and here you can select the specs, browser, etc and run
      npx cypress run - is to run from command line, I will cover this,

  • @Shalb_y
    @Shalb_y ปีที่แล้ว

    Hello. Thank you for this step by step video, it has been rather helpful. I know that it has been about a year since you made this video, but I'm stuck and I need help, so I'm praying you see this. Upon installing cypress to my visual studio, I got an error of "... dyld: symbol not found:..." and I was just wondering if you could please help me fix this so that I can progress with my learning. Thank you.🤧🤧

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Shalom
      The error message you are getting means that the Cypress application is unable to find a symbol that it needs. This can happen if the symbol is not installed on your system or if it is installed in a different location than where Cypress is looking for it.
      To fix this error, you can try the following:
      1. Make sure that you have installed the latest version of Cypress. You can check the Cypress website for the latest version.
      2. Make sure that the symbol is installed on your system. You can check the system requirements for Cypress to see which symbols are required.
      3. If the symbol is not installed on your system, you can install it using the appropriate package manager. For example, if you are using macOS, you can use Homebrew to install the symbol.
      4. If the symbol is installed on your system but Cypress is still unable to find it, you can try setting the `DYLD_LIBRARY_PATH` environment variable to the location where the symbol is installed.
      Here are the steps on how to set the `DYLD_LIBRARY_PATH` environment variable:
      1. Open a terminal window.
      2. Type the following command:
      ```
      export DYLD_LIBRARY_PATH=
      ```
      Replace `` with the path to the directory where the symbol is installed.
      3. Restart your computer.
      Once you have done these steps, the error should be fixed and you should be able to run Cypress without any problems.
      If you are still having problems, you can try contacting Cypress support for help.
      I hope this helps

  • @BBunny09
    @BBunny09 ปีที่แล้ว

    Got 18/20 in first quiz.

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Excellent Usman

  • @shrishtigupta9120
    @shrishtigupta9120 หลายเดือนก่อน

    Score is 16/20

    • @RaghavPal
      @RaghavPal  หลายเดือนก่อน

      Great Shrishti .. keep learning

  • @brunoveiga9155
    @brunoveiga9155 10 หลายเดือนก่อน

    Good content bro

    • @RaghavPal
      @RaghavPal  10 หลายเดือนก่อน

      Thanks Bruno

  • @dev.daily_code
    @dev.daily_code 8 หลายเดือนก่อน

    Thanks :)

    • @RaghavPal
      @RaghavPal  8 หลายเดือนก่อน

      Most Welcome

  • @BugLifes
    @BugLifes ปีที่แล้ว

    Total points
    My point is 13/20

  • @discoverall199
    @discoverall199 2 ปีที่แล้ว

    Hey Ragav, could you please cover or have a session on how to click on iFrame and Pop up windows. That will be very helpful

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว +2

      Ok, will do

  • @AHMEDNOORMABDI
    @AHMEDNOORMABDI 10 หลายเดือนก่อน

    Total points
    14/20

    • @RaghavPal
      @RaghavPal  10 หลายเดือนก่อน

      Great all the best for next

  • @digitally_ascended_conscio6304
    @digitally_ascended_conscio6304 2 ปีที่แล้ว +1

    Excellent, will there be a follow up with deeper layers like adding selectors from css/xpath and basic js functions?

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      I will try to add

  • @saraefaf8496
    @saraefaf8496 ปีที่แล้ว

    Hi, thank you so much , for a nice tutorial, i have a js app, and I want to create a unit test with cypress that runs in test explorer in vs. Is it possible? if yes can you explain to me how?

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Hi Sara,
      Yes, it is possible to run Cypress tests in Visual Studio Test Explorer. Here are the steps to do so:
      Install the Microsoft.VisualStudio.TestPlatform.ObjectModel.Cypress NuGet package in your Visual Studio project. This package provides the necessary components to run Cypress tests in Test Explorer.
      Create a cypress.json file in the root directory of your Cypress project, if you don't already have one. This file specifies the location of your Cypress tests and the Cypress executable.
      In your Visual Studio project, create a new test class and add a test method to it. Here's an example:
      using Microsoft.VisualStudio.TestTools.UnitTesting;
      using Microsoft.VisualStudio.TestPlatform.ObjectModel.Cypress;
      [TestClass]
      public class CypressTests
      {
      [TestMethod]
      public void RunCypressTests()
      {
      var cypressSettings = new CypressSettings
      {
      WorkingDirectory = @"C:\path\to\your\cypress\project",
      CypressExecutable = @"C:\path\to\your\cypress\executable"
      };
      var cypressTestRunner = new CypressTestRunner(cypressSettings);
      var testRunRequest = cypressTestRunner.GetTestRunRequest();
      // Add any additional settings to the test run request here, if needed
      var testRun = new TestRun();
      var results = testRun.Run(testRunRequest);
      // Analyze test results here
      }
      }
      In the RunCypressTests method, create an instance of the CypressSettings class and set the WorkingDirectory and CypressExecutable properties to the appropriate values for your Cypress project.
      Create an instance of the CypressTestRunner class, passing in the CypressSettings instance.
      Call the GetTestRunRequest method on the CypressTestRunner instance to get a TestRunRequest object.
      Optionally, modify the TestRunRequest object to include any additional settings, such as filters for the tests to run.
      Create a new TestRun object and call its Run method, passing in the TestRunRequest object.
      Analyze the test results returned by the Run method to determine whether any tests failed or encountered errors.
      Note that you'll need to have the appropriate versions of Cypress and the Cypress Test Runner installed on your machine in order for the tests to run successfully. You can install these using npm or yarn, depending on your package manager preference.

  • @priyapandey1595
    @priyapandey1595 2 ปีที่แล้ว

    I got 18/20

  • @shivalimaria25
    @shivalimaria25 11 หลายเดือนก่อน

    9/10

    • @RaghavPal
      @RaghavPal  11 หลายเดือนก่อน

      Great score Shivali

  • @uthpalidissanayake7740
    @uthpalidissanayake7740 ปีที่แล้ว

    Hello!
    Can we automate add-ins on microsoft word using cypress?

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Not aware on this, pls check online examples

  • @philippians1213
    @philippians1213 5 หลายเดือนก่อน

    Raghav,
    Is it just copy pasting the locators?
    Can't we use Xpath with cypress?
    Can you tell me how ?
    It will be so helpful !!

    • @RaghavPal
      @RaghavPal  5 หลายเดือนก่อน +1

      While Cypress primarily uses CSS selectors for element selection, you can use XPath as well. However, this requires installing a plugin because Cypress does not support XPath by default.
      Here's how you can add XPath support to your Cypress setup:
      1. Install the XPath Plugin: You need to install the `cypress-xpath` plugin. You can do this using npm or Yarn:
      ```bash
      npm install -D cypress-xpath
      # or
      yarn add cypress-xpath --dev
      ```
      2. Include the Plugin in Your Project: After installing the plugin, you need to include it in your project's `cypress/support/index.js` file:
      ```javascript
      require('cypress-xpath')
      ```
      3. Use XPath in Your Tests: Once the plugin is included, you can use the `cy.xpath()` command to select elements using XPath. Here's an example:
      ```javascript
      it('finds list items', () => {
      cy.xpath('//ul[@class="todo-list"]//li').should('have.length', 3)
      })
      ```
      4. TypeScript and IntelliSense Support: If you're using TypeScript, or want IntelliSense support in your IDE, you should add the following comment to your spec file:
      ```javascript
      ///
      ```
      This will allow you to use XPath just as you would use CSS selectors in Cypress. Remember to replace the example XPath with the actual path you need for your tests
      And no, it's not just about copy-pasting the locators. You'll need to ensure that the locators you use are accurate and reflect the structure of the HTML document you're testing against. Using XPath can be particularly useful when you need to locate elements that are difficult to select with CSS selectors.
      Happy testing

    • @philippians1213
      @philippians1213 5 หลายเดือนก่อน

      @@RaghavPal but I heard that the plugin has been deprecated Raghav !

    • @RaghavPal
      @RaghavPal  5 หลายเดือนก่อน

      This can help stackoverflow.com/questions/76458143/is-there-an-alternative-way-to-use-xpath-with-cypress-now-that-the-official-plug

    • @philippians1213
      @philippians1213 5 หลายเดือนก่อน

      Thanks a lot Raghav !
      I developed a cypress code for our sign up screen. The sign up page is third party application called clerk. When i click on sign up button using cypress code it always gives me 429 error.
      I added lot of waits but still the same issue Raghav

    • @RaghavPal
      @RaghavPal  5 หลายเดือนก่อน

      I understand that you're encountering a 429 error when testing your sign-up screen using Cypress. Let's explore some potential solutions to overcome this issue:
      1. Rate Limiting Requests:
      - The 429 status code typically indicates that you're making too many requests in a short period, and the server is rate-limiting your access.
      - To address this, you can add a `cy.wait()` in your loop to throttle the requests. The wait time should be based on the maximum request rate allowed by the server. For example, if the limit is 30 requests per second, you might use a wait of 50 milliseconds.
      - Additionally, consider using the `HEAD` method instead of `GET` for your requests. You can apply `{ log: false }` to the commands to reduce memory usage.
      - Here's an example of how you can modify your code:
      ```javascript
      const results = [];
      cy.request('sitemap.xml')
      .its('body')
      .then(xml => {
      return [...Cypress.$(xml).find('loc')].map(el => el.innerText);
      })
      .then(urls => {
      urls.forEach(url => {
      cy.request({
      method: 'HEAD',
      url,
      failOnStatusCode: false,
      log: false,
      }).then(response => {
      if (response.status !== 200) {
      results.push({ url, status: response.status });
      }
      });
      cy.wait(50, { log: false }); // Throttle requests
      });
      });
      cy.then(() => {
      cy.log('Bad URLs', results);
      });
      ```
      - Adjust the wait time and other parameters based on your specific scenario
      2. Check Same-Origin Policy:
      - Ensure that you're not violating the same-origin policy. Cypress allows visiting domains of the same origin within a single test. If you need to visit different origin domains, consider splitting them into separate tests
      3. Authentication Issues:
      - If the sign-up page requires authentication, make sure you're handling it correctly. Open the developer console while reproducing the error via Cypress to inspect the response in more detail
      Remember to adapt these suggestions to your specific use case.

  • @exploringgilgitbaltistan2390
    @exploringgilgitbaltistan2390 7 หลายเดือนก่อน

    Hello sir..
    I face problem during automate drop down
    Scenario
    First click on drop down > enter tex (drop down value are hidden here) > press enter (after enter press drawdown values are shown )> select the value
    Sir how I handle this type of drop down
    Hindi... pehly drop down py click kro phr value enter kr k ok krny k bad hi hidden value show hoti hain then osy select kro..
    Need help sir

    • @RaghavPal
      @RaghavPal  7 หลายเดือนก่อน

      Let's break down the scenario and discuss how to handle it step by step:
      1. Click on the Dropdown:
      - First, locate the dropdown element using `cy.get()` or any other relevant selector.
      - Use `.click()` to open the dropdown.
      2. Enter Text (Hidden Values):
      - Since the dropdown values are hidden initially, you won't see them until you start typing.
      - Use `.type('your text')` to simulate typing into the dropdown input field.
      - This action should trigger the dropdown to reveal the filtered options.
      3. Press Enter:
      - After typing your text, simulate pressing the Enter key using `.type('{enter}')`.
      - This will confirm your input and display the dropdown options.
      4. Select the Value:
      - Now that the dropdown options are visible, use `.contains('option text').click()` to select the desired value.
      - Replace `'option text'` with the actual text of the option you want to select.
      Here's an example of how you can handle this scenario in Cypress:
      ```javascript
      it('Handles dropdown with hidden values', () => {
      cy.visit('your-page-url') // Replace with your actual page URL
      cy.get('your-dropdown-selector').click() // Replace with your actual dropdown selector
      cy.get('your-dropdown-input-selector').type('your text')
      cy.get('your-dropdown-input-selector').type('{enter}')
      cy.contains('option text').click() // Replace with the actual option text
      })
      ```
      Remember to replace the placeholders (`your-page-url`, `your-dropdown-selector`, `your-dropdown-input-selector`, and `option text`) with the appropriate values from your application.
      Additionally, if the dropdown uses AJAX or dynamic loading to fetch options, you may need to wait for the options to load using `cy.wait()` or other Cypress commands.

    • @exploringgilgitbaltistan2390
      @exploringgilgitbaltistan2390 7 หลายเดือนก่อน

      @@RaghavPal thank u sir for such a quick response
      Main problem is
      All values are hidden and it only show when I type and the enter
      When I try to type then screen automatically moved down..
      I watch many vedios but mostly vedios deal with shows value during typing but my problem is first type then press enter
      During this screen moved down and I can't type any thing
      ....
      I will try this thank you sooooo.. much for your great time

    • @RaghavPal
      @RaghavPal  7 หลายเดือนก่อน

      Yes, handling dynamic dropdowns can be tricky, especially when values are hidden until you type and press Enter.
      Let's break down the steps to handle this type of dropdown:
      1. Type and Press Enter:
      - You mentioned that the dropdown values are hidden until you type and press Enter.
      - To simulate this behavior, you can use the `.type()` command followed by `{enter}` to trigger the dropdown to reveal its options.
      2. Scrolling Issue:
      - If the screen automatically moves down when you type, you can try adjusting the viewport size using `cy.viewport()` to prevent unwanted scrolling.
      - For example:
      ```javascript
      cy.viewport(1200, 800); // Set a custom viewport size
      ```
      3. Selecting the Value:
      - Once the dropdown values are visible, you can use `.contains()` or `.eq()` to select the desired value.
      - Example:
      ```javascript
      cy.get('.dropdown-input').type('Your Value{enter}');
      cy.get('.dropdown-options').contains('Your Value').click();
      ```
      4. Hidden Input Tag:
      - Sometimes, the actual value is stored in a hidden input field associated with the dropdown.
      - You can access the hidden input value using `.should('have.value', 'Your Value')`.
      - Example:
      ```javascript
      cy.get('.hidden-input').should('have.value', 'Your Value');
      ```
      5. Debugging:
      - Use `cy.log()` to debug and check intermediate values during your test.
      - Inspect the DOM to identify the correct selectors for your dropdown elements.
      6. Example (Vue-multiselect):
      - If you're dealing with a Vue-multiselect dropdown, here's how you can select by typing and pressing Enter:
      ```javascript
      it('selects from vue-multiselect by typing', () => {
      cy.viewport(1000, 1000);
      cy.visit('vue-multiselect.js.org/');
      cy.get('div.multiselect').eq(0)
      .type('NO Dependencies {enter}'); // Select an item
      cy.get('div.multiselect').eq(0)
      .within(() => {
      cy.get('span.multiselect__tag')
      .should('have.length', 1)
      .invoke('text')
      .should('contain', 'NO Dependencies');
      });
      });
      ```
      Remember to replace the selectors (`'.dropdown-input'`, `'.dropdown-options'`, etc.) with the actual ones from your application. Adjust the code according to your specific dropdown implementation.

  • @amolkhadbade102
    @amolkhadbade102 ปีที่แล้ว

    Hi Rahave , does we need to put all our test file under E2E folder , previously it put under integration/example folder .

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Yes, can also check this updates video th-cam.com/video/B4r2h84tGEM/w-d-xo.html

  • @Lucajeck
    @Lucajeck ปีที่แล้ว

    thank you for your wounderful couse.
    However, I cannot put the examples in your tutorial into practice because the cookie banner always appears on every site. How can I prevent this from happening? Thank you

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว +1

      There are a few ways to prevent the cookie banner from appearing when you are using Cypress. One way is to use the `cy.preserveOnce()` command to preserve the cookie that indicates that you have already accepted the cookie policy. This command will store the cookie in the browser's local storage, so it will not be deleted when Cypress clears the cookies before each test.
      Another way to prevent the cookie banner from appearing is to use the `cy.on()` command to listen for the `window:before:load` event. This event is fired before the page is loaded, so you can use it to set the cookie that indicates that you have already accepted the cookie policy.
      Finally, you can also prevent the cookie banner from appearing by adding the following code to your Cypress support file:
      ```
      const COOKIE_NAME = "cookie_notice";
      const COOKIE_VALUE = "ACCEPTED";
      cy.on("window:before:load", window => {
      window.document.cookie = `${COOKIE_NAME}=${COOKIE_VALUE}`;
      });
      ```
      This code will set the cookie that indicates that you have already accepted the cookie policy before the page is loaded.
      Which method you use to prevent the cookie banner from appearing will depend on your specific needs. If you only need to prevent the cookie banner from appearing for a few tests, then the `cy.preserveOnce()` command is a good option. If you need to prevent the cookie banner from appearing for all of your tests, then the `cy.on()` command or the code snippet above are good options.
      I hope this helps

    • @Lucajeck
      @Lucajeck ปีที่แล้ว

      @@RaghavPal thank you very much :)

  • @andrewa5080
    @andrewa5080 2 ปีที่แล้ว

    Hi Raghav,
    Thanks for all your fantastic training videos. They have really helped me and very happy to have someone like you providing very easy to understand training.
    Is it possible to reach you by email?

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      Hi Andrew, you can find email in about section of the channel, But the fastest way will be to comment here

  • @saajidhnawwar8505
    @saajidhnawwar8505 2 ปีที่แล้ว +1

    I'm new to cypress. The installation of cypress worked fine. But when I choose chrome on cypress to open, a blank tab appears and in the terminal i get an error "Passthrough is not supported, GL is disabled,ANGLE is ". Most of the solutions I came across was to enable webgl on chrome. Even though it was enabled, I keep getting this error. Does anyone have any solution?

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      Hi Saajidh,
      A user comment says -
      I deleted all of Cypress folders : "roaming , app data , modules " everything and reinstalled it .
      problem solved
      this should help you - github.com/cypress-io/cypress/issues/18947

  • @saiprasad4942
    @saiprasad4942 ปีที่แล้ว

    Wt is use of visual studio code?

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Hi Sai,
      Can get beginners video on VS Code under IDE section here - automationstepbystep.com/

  • @SyedaZairaAliBukhari
    @SyedaZairaAliBukhari 9 หลายเดือนก่อน

    Hello Sir,
    I have been following your video but when i create a new spec, it displays "No tests found" -Cypress could not detect tests in this file. Can you please guide, what can be done to make it work?
    Thanks.
    46:00

    • @RaghavPal
      @RaghavPal  9 หลายเดือนก่อน +1

      Syeda
      can you show the commands you used. Most probably you are using backslashes in the path of the test file in the command. Try to use forwards slash / and try again

    • @SyedaZairaAliBukhari
      @SyedaZairaAliBukhari 9 หลายเดือนก่อน

      Thank you for Responding sir, I figured out the issue that was related to an older version of node.js, updated it to the latest version and it worked.
      @@RaghavPal

  • @stephenalexander3712
    @stephenalexander3712 ปีที่แล้ว

    i got 18 in the test

  • @alexanderolakunle9020
    @alexanderolakunle9020 4 หลายเดือนก่อน

    Please I was stuck at the google home page as a pop up appear which was a cookie, how do i get rid of it

    • @RaghavPal
      @RaghavPal  4 หลายเดือนก่อน

      Alexander
      Handling pop-ups and cookies during web automation testing is essential. Let's address this issue step by step
      1. Handling Pop-ups:
      - When a pop-up appears, you can use Cypress to interact with it.
      - If the pop-up is a simple JavaScript alert, confirm, or prompt box, you can handle it using Cypress commands.
      - For example, if you encounter an alert box, you can use `cy.on('window:alert', ...)` to handle it.
      - Confirm boxes can be handled using `cy.on('window:confirm', ...)`
      - However, if the pop-up is a custom modal or a complex UI element, you might need to inspect its structure and use appropriate Cypress commands to interact with it.
      2. Clearing Cookies:
      - To get rid of cookies, you can use the `cy.clearCookies()` command
      - Cypress automatically clears all cookies before each test to prevent state from being shared across tests when test isolation is enabled
      - You can use `cy.clearCookies()` at the beginning of your test case to ensure a clean state
      - This command clears cookies for the current domain
      - If you want to clear a specific cookie, you can use `cy.clearCookie('cookieName')`
      Here's an example of how you can use `cy.clearCookies()` in your Cypress test:
      ```javascript
      // Clear cookies after logging in
      cy.contains('Login').click() // Assume we just logged in
      cy.url().should('include', 'profile')
      cy.clearCookies()
      cy.visit('/dashboard') // We should be redirected back to login
      cy.url().should('include', 'login')
      ```
      Remember to replace `'Login'`, `'profile'`, and `'/dashboard'` with the actual elements and URLs relevant to your application. This example demonstrates clearing cookies after a login action
      ---

    • @alexanderolakunle9020
      @alexanderolakunle9020 4 หลายเดือนก่อน

      @@RaghavPal Thank you so much as this question came out in the interview I had today

  • @piano_dreamerc_moll2475
    @piano_dreamerc_moll2475 2 ปีที่แล้ว +21

    I wander how many test frameworks do you know? It‘s always a pleasure to watch your tutorials and especially the way you explain makes everything easy to understand. I have learnt a lot from you and many thanks to you and greetings from Germany. 🥰👍🙏👏

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว +1

      Most welcome

  • @shubhamgaygol6737
    @shubhamgaygol6737 ปีที่แล้ว +1

    Cypress Quiz 1
    March 10, 2021AutomationComments: 0
    Congratulations - you have completed Cypress Quiz 1
    You scored 10 out of 10 points
    Your answers are shown below
    😊

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Well done Shubham

  • @supriya7123
    @supriya7123 3 วันที่ผ่านมา +1

    I am facing issue of module not found while installing package.json file basically its not showing npm in system

    • @RaghavPal
      @RaghavPal  2 วันที่ผ่านมา

      Supriya
      Sounds like npm (the tool that installs stuff for Cypress) might not be on your computer or is acting up
      Install Node.js: This usually comes with npm. Grab it from the official Node.js website
      Go to your project folder: In your terminal, use cd to get to where your package.json file is
      Install stuff: Run npm install to get all the things Cypress needs
      Still getting "module not found" errors?
      Check for typos: Make sure the package names in your package.json are correct
      Clear the cache & retry: Run npm cache clean --force then try npm install again.
      Google it: If a specific package is causing trouble, search online for solutions
      Extra tips
      Proxy/Firewall? You might need to tell npm how to get through.
      Try Yarn: It's another tool like npm, sometimes it's faster or more reliable
      -

  • @Masheru14
    @Masheru14 2 หลายเดือนก่อน +1

    sir, i see there are 2 path cypress tutorial. one is 'beginner masterclass' has 4 video and other is 'cypress beginner tutorial' has 16 video ? what's different ?

    • @RaghavPal
      @RaghavPal  2 หลายเดือนก่อน

      In the Masterclass series, I have convered multiple topics in single lectures.. in the other one there is one lecture for each topic

  • @dinofrog926
    @dinofrog926 ปีที่แล้ว +1

    Are there any quick commands to type out an it or a describe faster than writing them manually? Thank you! :)

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Dinofrog
      Yes, there are a few quick commands to type out an it or a describe block faster than writing them manually.
      One way is to use the Cypress command palette. To open the command palette, press `Ctrl`+`Shift`+`P` on Windows or `Cmd`+`Shift`+`P` on Mac. Then, type "describe" or "it" and select the appropriate command.
      Another way is to use keyboard shortcuts. To create a new describe block, press `Ctrl`+`Enter` on Windows or `Cmd`+`Option`+`Enter` on Mac. To create a new it block, press `Ctrl`+`Shift`+`Enter` on Windows or `Cmd`+`Shift`+`Option`+`Enter` on Mac.
      You can also use Cypress snippets to type out it and describe blocks faster. To use a snippet, press `Ctrl`+`Tab` on Windows or `Cmd`+`Tab` on Mac. Then, select the snippet you want to use.
      Here are some examples of Cypress snippets for it and describe blocks:
      ```
      // Describe block snippet
      describe('{describeName}', () => {
      // Test code goes here
      });
      ```
      ```
      // It block snippet
      it('{itName}', () => {
      // Test code goes here
      });
      ```
      You can also create your own custom snippets for it and describe blocks. To do this, open the VS Code settings editor (press `Ctrl`+`,` on Windows or `Cmd`+`,` on Mac). Then, search for "Cypress snippets" and add your custom snippets to the `cypress.snippets` array.
      I hope this helps

  • @closterito01
    @closterito01 ปีที่แล้ว +8

    You're such a great teacher. I'm new to the QA world but this has been one of the best tutorials I've ever took in all my professional career.

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว +1

      So happy and humbled to see this. Thanks Arturo

    • @thorfinnkarlsefni492
      @thorfinnkarlsefni492 หลายเดือนก่อน

      Agree, really great and calm tutorial and explanation 😊

  • @suyashnachankar9342
    @suyashnachankar9342 ปีที่แล้ว +1

    Absolutely brilliant explanation and knowledge shared. Thank you very much !
    Being a fresher, should we start with Java Selenium OR Cypress ? [Job-Oriented Question]

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว +1

      Suyash
      You can start with any. Looking at the small learning curve, you may first do Cypress, however I will suggest learning Selenium will be good and important, as it will give you insights on designing and developing automation framework from scratch

    • @suyashnachankar9342
      @suyashnachankar9342 ปีที่แล้ว

      Thank you very much @@RaghavPal ! This was helpful. Yes, I too felt Cypress to be more beginner-friendly, lightweight and modern, yet solid to start with. I appreciate you taking time to answer every question here on a free platform 🙏👍

  • @Artisticanand
    @Artisticanand 4 หลายเดือนก่อน +1

    Hi sir i am new here , i am a manual tester who need to change to automation. Did i need to start from this cypress master class or cypres beginner class , or i need to first study the javascript ?
    please reply

    • @RaghavPal
      @RaghavPal  4 หลายเดือนก่อน +1

      Anand
      you can go through the Cypress Masterclass first. Let me know if you face any issues

    • @Artisticanand
      @Artisticanand 4 หลายเดือนก่อน

      ​@@RaghavPal Thankyou sir, i will let you know.

  • @basantaroy3696
    @basantaroy3696 ปีที่แล้ว +1

    Hi Raghav,
    I'm facing a problem related to the browser language while running my first test script can you please help me to change the browser language to English in cypress.

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Hi Basanta,
      You can change the browser language to English in Cypress by modifying the accept-language header of the browser.
      Here is an example of how you can set the browser's language to English:
      /*
      Cypress.Commands.overwrite("request", (originalFn, ...args) => {
      const [options] = args;
      options.headers = options.headers || {};
      options.headers["Accept-Language"] = "en-US";
      return originalFn(...args);
      });
      */
      This code overwrites the request command in Cypress and sets the Accept-Language header to en-US. This will change the browser's language to English.
      You can place this code in your cypress/support/index.js file, so that it will be automatically executed before any tests are run
      Ref: docs.cypress.io/api/commands/request

    • @basantaroy3696
      @basantaroy3696 ปีที่แล้ว

      @@RaghavPal thanks Raghav it is really fun learning from your tutorials.

  • @mayuribarve2398
    @mayuribarve2398 3 หลายเดือนก่อน +1

    Amazing video
    scored 9/10 in each of my tests :)
    just missed one step from the video where you opened the Test Runner screen after explaining the screen shots captured step by step. please let me know how did you open the test runner screen at time 1:12:34 in the video ?
    Thanks for all your help and support!!

    • @RaghavPal
      @RaghavPal  3 หลายเดือนก่อน +1

      Most welcome Mayuri
      I did not get you.. at the time step you mentioned i am simply explaining with the screenshot

    • @mayuribarve2398
      @mayuribarve2398 3 หลายเดือนก่อน

      @@RaghavPal the cypress test runner screen I meant.
      The screen with Test Status Menu, URL previewing,
      Viewport Sizing etc
      Sorry unable to paste screen shot in the comments here 😔

    • @RaghavPal
      @RaghavPal  3 หลายเดือนก่อน

      ok, can you check and let me know the exact timestamp from the video

    • @mayuribarve2398
      @mayuribarve2398 3 หลายเดือนก่อน

      @@RaghavPal its the same time stamp at 1: 12:34 just verified . the Cypress Test Runner Screen(with Test Status Menu, URL Preview, View Port Sizing etc...) , I think it is a screen shot. I am missing out from where you opened that screen shot from ?
      Anyways that is the only step I ma missing, rest I am good. Done with second masterclass video as well. Looking forward to the next two ones now.
      Totally appreciate your replies :)

  • @whitenoisefocus7962
    @whitenoisefocus7962 ปีที่แล้ว +2

    Raghav, This video is awesome. I have an interview in JavaScript/Cypress, both of which are new to me (I'm Cucumber/Java currently). Your channel will give me the ability to learn what I need to know in a very short time and pass this interview. You are a very knowledgeable tester and a great teacher! Keep up the great work. I will take the quiz tomorrow morning. 🔥

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว +1

      So happy and humbled to read this. You can check here if you need any help - automationstepbystep.com/

  • @kimyangKo
    @kimyangKo 7 หลายเดือนก่อน +1

    1.Clicking play icon in embedded video frame is it possible in cypress
    2. How you verify the text or button after you click any object
    3. What is the correct replacement of waitforInvisibilityofElementLocated
    4. How you manage text you enter is matching with the review screen
    Lets say i have add passenger in screen 1 and verify passenger in screen 2 how you manage to do thia

    • @RaghavPal
      @RaghavPal  7 หลายเดือนก่อน

      Certainly! Let's address each of your questions:
      1. Clicking Play Icon in Embedded Video Frame in Cypress:
      To interact with a play icon within an embedded video frame using Cypress, follow these steps:
      - First, locate the video frame using a selector (e.g., `cy.get('')`).
      - Switch to the context using `cy.()` or `cy.frame()`.
      - Within the , find the play icon element (e.g., `cy.get('.play-icon')`).
      - Click the play icon using `cy.click()`.
      2. Verifying Text or Button After Clicking an Object:
      After clicking an object (e.g., a button), you can verify the expected text or state change using assertions. For example:
      ```javascript
      cy.get('.my-button').click();
      cy.get('.result-text').should('contain', 'Success');
      ```
      3. Replacement for `waitForInvisibilityOfElementLocated`:
      In Cypress, there isn't a direct replacement for `waitForInvisibilityOfElementLocated` (commonly used in Selenium). However, you can achieve similar behavior using the following approach:
      ```javascript
      // Wait for an element to become invisible
      cy.get('.my-element').should('not.be.visible');
      ```
      4. Managing Text Matching with Review Screens:
      When entering text and verifying it on a review screen (e.g., adding a passenger in screen 1 and verifying in screen 2), consider the following:
      - Screen 1 (Add Passenger):
      - Enter passenger details (e.g., name, age, etc.).
      - Store the entered details (e.g., in variables or data structures).
      - Screen 2 (Verify Passenger):
      - Retrieve the stored details.
      - Verify that the displayed passenger information matches the stored data.
      Remember to use Cypress commands like `cy.get()`, `should()`, and `expect()` to validate the expected behavior.
      ..

  • @PriyaDharshini-iy2sw
    @PriyaDharshini-iy2sw 9 หลายเดือนก่อน +1

    18out of 20.thank you so much sir for giving us confidence to attend the interviews with good knowledge. Thank you thank you thank you.❤🎉

    • @RaghavPal
      @RaghavPal  9 หลายเดือนก่อน

      Well done Priya

  • @ShivanieAgarwal
    @ShivanieAgarwal หลายเดือนก่อน

    I enjoyed watching this masterclass. But I have a suggestion. For beginners and particularly for who are absolutely new to automation, it would be great if you could actually explain the terminologies used in cypress, as this would help us in connecting more with what we are learning.
    Also, when it comes to functions it becomes difficult to understand which functions should be used, and how. Could you harp on them too...?
    I score 9/10 on the first quiz! Yayy!
    Apart from this, I believe it was a good start. Thank you @raghavpal

    • @RaghavPal
      @RaghavPal  หลายเดือนก่อน

      Sure Shivanie
      thanks for the feedback

  • @megikontaktal4401
    @megikontaktal4401 หลายเดือนก่อน

    Hi, about the local host url, should I add somewhere in the code in VS? When I run npx cypress open on terminal/configure E2E testing/choose chrome browser a blank page appears and I don't have access on Chrome

    • @RaghavPal
      @RaghavPal  หลายเดือนก่อน

      Megi
      Here are some steps to help you resolve this:
      1. Set Base URL in Cypress Configuration:
      - Open your `cypress.config.js` file.
      - Add or update the `baseUrl` property to point to your local host URL. For example:
      ```javascript
      module.exports = {
      e2e: {
      baseUrl: 'localhost:3000', // Replace with your local host URL
      setupNodeEvents(on, config) {
      // implement node event listeners here
      },
      },
      };
      ```
      2. Visit URL in Tests:
      - In your test files, use `cy.visit('/')` to navigate to the base URL specified in your configuration. For example:
      ```javascript
      describe('My Test Suite', () => {
      it('should load the home page', () => {
      cy.visit('/');
      // Add your test steps here
      });
      });
      ```
      3. Check Chrome Browser Configuration:
      - Ensure that Chrome is correctly configured and accessible by Cypress. Sometimes, issues can arise if there are restrictions or security settings in Chrome.
      4. Disable Test Isolation:
      - If you are seeing a blank page, you might need to disable test isolation in your configuration. Add `testIsolation: false` to your `cypress.config.js`:
      ```javascript
      module.exports = {
      e2e: {
      baseUrl: 'localhost:3000',
      testIsolation: false,
      setupNodeEvents(on, config) {
      // implement node event listeners here
      },
      },
      };
      ```
      5. Check for Errors in Console:
      - Open the developer console in Chrome (F12 or right-click and select "Inspect") and check for any errors or warnings that might give more insight into why the page is not loading.
      6. Update Cypress and Dependencies:
      - Ensure that you are using the latest version of Cypress and that all dependencies are up-to-date. Run `npm update` to update your packages.
      --

  • @shakuntalan6398
    @shakuntalan6398 ปีที่แล้ว

    Hi,KINDLY MAKE AN VIDEO OF CYPRESS TESTRUNNER
    I HAVE USING 12.1.0 USING SESSION FEATURE
    while executing testrunner UI not fetching the list of data
    For example: in one module I need to navigate user page
    After navigating list of user need to validate
    But while running through cypress list of user itself not displaying .

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      ok, I will check on that

  • @lts8683
    @lts8683 2 ปีที่แล้ว +2

    Can you please make course about Gitlab advanced.
    Thank you

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว +1

      I will plan

  • @hemangikadam6550
    @hemangikadam6550 3 หลายเดือนก่อน

    Sir, how to solve this error.
    Default blank page
    This page was cleared by navigating to about:blank.
    All active session data (cookies, localStorage and sessionStorage) across all domains are cleared.

    • @RaghavPal
      @RaghavPal  3 หลายเดือนก่อน

      Hemangi
      If you're encountering a blank page issue in Cypress, where the UI doesn't display after running tests, there are a few steps you can take to troubleshoot and potentially resolve the problem:
      1. Check Test Isolation Configuration:
      - In your `cypress.config.js` file, add the following configuration:
      ```javascript
      module.exports = {
      // Other configurations...
      e2e: {
      testIsolation: false,
      },
      };
      ```
      - Setting `testIsolation` to `false` can help prevent issues related to clearing session data between tests¹.
      2. Visit a Neutral Blank Page:
      - To separate tests and prevent application callbacks, visit a neutral blank page before each test.
      - Use `cy.visit('about:blank')` to load a blank page explicitly².
      3. Verify Test Structure:
      - Ensure that your `describe` and `it` statements are correctly structured.
      - Double-check that your test file follows the expected format.
      - Consider creating a minimal test file to isolate the issue and gradually add complexity.
      4. Content Security Policy (CSP):
      - Sometimes, strict CSP settings can cause issues.
      - Try disabling CSP in Chrome using the "Disable Content-Security-Policy" extension³.
      Remember to adapt these solutions to your specific project and environment
      --

  • @sachinade5703
    @sachinade5703 4 หลายเดือนก่อน

    Hi Raghav sir. I am using Cypress for testing a web application. I am facing some issues while testing a tooltip present on a high chart. I am trying to hover over a specific point on high chart. After hovering over that particular point the tooltip associated with that point should be visible. But this expected behavior cannot be seen after executing my script. Can you please try this scenario. Thanks.

    • @RaghavPal
      @RaghavPal  4 หลายเดือนก่อน

      Sachin
      Testing tooltips in Cypress can be a bit tricky, especially when dealing with dynamic content like high charts. Let's break down the steps to achieve this:
      1. Hover Over the Chart Point:
      - First, you need to simulate hovering over the specific point on the high chart. You can use the `trigger` command to trigger a mouse event (e.g., `mouseenter`) on the chart element.
      - For example:
      ```javascript
      cy.get('.highcharts-point') // Replace with the actual selector for the chart point
      .trigger('mouseenter');
      ```
      2. Wait for Tooltip to Appear:
      - After triggering the hover event, you'll need to wait for the tooltip to appear. Use the `should` command to assert that the tooltip is visible.
      - For example:
      ```javascript
      cy.get('.highcharts-tooltip') // Replace with the actual selector for the tooltip
      .should('be.visible');
      ```
      3. Verify Tooltip Content:
      - Once the tooltip is visible, you can verify its content. Use the `contains` assertion to check if it contains the expected text.
      - For example:
      ```javascript
      cy.get('.highcharts-tooltip')
      .should('contain', 'Expected Tooltip Text');
      ```
      4. Complete Example:
      - Here's a complete example combining the steps:
      ```javascript
      cy.get('.highcharts-point') // Replace with the actual selector for the chart point
      .trigger('mouseenter');
      cy.get('.highcharts-tooltip') // Replace with the actual selector for the tooltip
      .should('be.visible')
      .should('contain', 'Expected Tooltip Text');
      ```
      5. Additional Considerations:
      - Ensure that your selectors are accurate. Inspect the chart and tooltip elements using Cypress DevTools to find the correct identifiers.
      - If the tooltip's component cannot be captured or located, consider using alternative approaches like capturing the tooltip content directly from the DOM or using custom events.
      Remember to adapt the selectors and text according to your specific application
      --

  • @jaminDNB
    @jaminDNB 10 หลายเดือนก่อน

    Thank you for your work and very good content =) But for some reason simle Cypress test is running very slowly with 'Your tests are loading...' message, much slower than Selenium or Playwright with C# =(

    • @RaghavPal
      @RaghavPal  10 หลายเดือนก่อน

      Ivan
      There are a few reasons why Cypress tests might be running slowly compared to Selenium or Playwright with C#.
      *1. Cypress Overhead:* Cypress has some overhead associated with its architecture, which can slow down test execution. This is because Cypress runs in a separate browser instance and communicates with the test runner via a WebSocket connection. This can add some latency to test execution, especially when running tests in parallel.
      *2. Slow Browser Startup:* Cypress starts a new browser instance for each test run, which can contribute to slower test execution times. This is because the browser needs to initialize and load the test page before Cypress can execute any tests.
      *3. Cypress Command Execution:* Cypress commands are executed sequentially, which means that each command must finish executing before the next command can begin. This can slow down test execution, especially if tests are making a lot of network requests or performing complex DOM manipulations.
      *Tips for Improving Cypress Test Execution Speed:*
      *1. Use Cypress.skip() to skip unnecessary tests:* Avoid running tests that are not providing value or that are known to be flaky. This will reduce the overall test execution time and improve the performance of your test suite.
      *2. Optimize network requests:* Minimize the number of network requests that your tests are making. This can be done by using caching strategies, batching requests, and using efficient data transfer formats like JSON or GraphQL.
      *3. Reduce DOM manipulations:* Optimize your test code to minimize the number of DOM manipulations. This can be done by using selectors that are more specific and by avoiding unnecessary DOM modifications.
      *4. Use parallel execution judiciously:* While parallel execution can improve test execution speed, it can also introduce overhead and instability. Use parallel execution selectively for tests that are independent and do not share state.
      *5. Consider using Cypress's performance profiling tools:* Cypress provides tools to profile test execution and identify performance bottlenecks. Use these tools to identify and address slow-running tests.
      *6. Evaluate Cypress alternatives:* Consider using alternative test automation frameworks like Selenium or Playwright if Cypress is consistently causing performance issues for your project. These frameworks may be better suited for projects with high performance requirements.
      Remember that performance optimization is an ongoing process, and it may require continuous effort to keep your Cypress test suite running efficiently.

  • @NeverStopLearning56
    @NeverStopLearning56 7 หลายเดือนก่อน

    Hi Raghav,
    Before learning cypress , we need to JS,
    The tutorials which you explained 4 yrs back is enough for Cypress Automation?

    • @RaghavPal
      @RaghavPal  7 หลายเดือนก่อน +1

      Yes, the javascript tutorials hold good. can learn the basics from there

  • @xXMrThomasXx
    @xXMrThomasXx 3 หลายเดือนก่อน

    My quiz result is 8/10 so not bad for the first time in Cypress :) Thx for this first part is very usefull. J eat something and time to part 2 :)

    • @RaghavPal
      @RaghavPal  3 หลายเดือนก่อน

      Well done

  • @lhalladay8600
    @lhalladay8600 6 หลายเดือนก่อน

    Do you have any documentation on migrating scripts from Katelyn to Cypress? Any insight would be very helpful. Thank you.

    • @RaghavPal
      @RaghavPal  6 หลายเดือนก่อน

      Can check this docs.cypress.io/guides/references/migration-guide

  • @muditranjan5015
    @muditranjan5015 ปีที่แล้ว

    Hi @Raghav Can we handle Cloudflare bots using Cypress. I have automated a website but now I am unable to login due to cloudflare bot management. Kindly Help.
    I liked your Classes.

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว +1

      Hi Mudit, I have not tried on this

  • @nivetharavi8596
    @nivetharavi8596 ปีที่แล้ว

    Hi Rahav, i have a doubt. Can we use Cypress test running with VPN connection? If yes could you tell me. Because test runner is not working for when i connected with VPN.

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Hi, this can help
      github.com/cypress-io/cypress/issues/22349
      www.browserstack.com/docs/automate/cypress/local-testing/proxies-firewall-vpn

  • @upparapallymahesh2544
    @upparapallymahesh2544 ปีที่แล้ว

    Hi raghav
    Before looking into this video do i need to learn programming language -javascript or can i directly start it from here
    Iam a beginner plz suggest the road map for cypress automation testing

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Hi Mahesh, It will help if you do some programming basics, However even if you are a complete beginner, you can start and follow with hands-on, You will learn as you do

  • @-cryptocurrencymarket915
    @-cryptocurrencymarket915 ปีที่แล้ว

    should i install cypress package, plugins like upload or xpath plugins with each created project? or there is a way to use the installed plugins in the previous project in the other coming projects?

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว +1

      When using Cypress, you typically install the necessary packages and plugins for each project separately. Cypress plugins are project-specific and not globally shared across projects by default. However, there are a few approaches you can consider to reuse plugins or configurations between projects:
      1. Share Plugins via npm Package: If you have developed custom Cypress plugins or found useful community plugins, you can publish them as npm packages. Then, you can install these packages in your new projects using `npm install`. This allows you to reuse plugins across multiple projects easily.
      2. Cypress Global Installation: You can install Cypress globally on your machine using `npm install -g cypress`. This allows you to use Cypress commands (`cypress open`, `cypress run`, etc.) from any project without requiring a local installation. However, keep in mind that each project will still need its own `cypress.json` configuration file.
      3. Configuration File Templates: If you have specific configurations or settings that you want to reuse across projects, you can create a template `cypress.json` file with the common settings. Whenever you start a new project, you can copy this template file and modify it as needed. This helps in maintaining consistency in configurations across projects.
      4. Cypress Test Runner and Project Management Tools: Some test runner and project management tools like Cypress Dashboard or Cypress Test Runner allow you to create test projects and manage configurations in a centralized manner. These tools provide features like test project templates, environment variables, and configuration management that make it easier to reuse configurations and plugins across projects.
      Remember that while sharing plugins or configurations can provide some level of reusability, it's also important to ensure compatibility and keep the plugins up to date with the latest versions and dependencies required by your projects.
      Overall, it's a good practice to consider the specific needs and requirements of each project and choose the appropriate approach for managing plugins and configurations in Cypress.

  • @samikshaparkar6755
    @samikshaparkar6755 ปีที่แล้ว

    Hello Raghav, Do you have idea if cypress support zoom in and out browser during test run is possible?Please reply

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Hi Samiksha,
      Yes, Cypress supports zoom in and out of the browser during test runs. You can use the cy.viewport() command to set the width, height, and zoom level of the browser. Here's an example:
      // Zoom out to 50%
      cy.viewport('macbook-13')
      cy.zoom(0.5)
      // Zoom in to 150%
      cy.viewport('macbook-13')
      cy.zoom(1.5)
      In this example, we are using the cy.viewport() command to set the browser viewport to a preset size (macbook-13 in this case), and then we are using the cy.zoom() command to set the zoom level to 50% or 150%, respectively.
      You can also use the cy.get('body').trigger() command to trigger a zoom in or out using a keyboard shortcut, like this:
      // Zoom in using keyboard shortcut (Ctrl + +)
      cy.get('body').trigger('keydown', { key: '+' })
      cy.get('body').trigger('keyup', { key: '+' })
      // Zoom out using keyboard shortcut (Ctrl + -)
      cy.get('body').trigger('keydown', { key: '-' })
      cy.get('body').trigger('keyup', { key: '-' })
      Note that these keyboard shortcuts may vary depending on the browser and operating system being used.

  • @anandsarpatwari7341
    @anandsarpatwari7341 ปีที่แล้ว +1

    Hi Sir, I have learnt Cypress going through all your tutorials and able to execute all my regression test now we are planning to migrate to automation does we require to purchase the licence to use it or we can use the way I am using for a single user, please need your help and information, Thank you

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Hi Anand, you will not need any license, License is needed for Cypress Dashboard only in case you like to use its features otherwise not, I have explained about Cypress Dashboard in the next sessions

    • @anandsarpatwari7341
      @anandsarpatwari7341 ปีที่แล้ว

      @@RaghavPal sir Thank you so much

  • @zainabfirdos2666
    @zainabfirdos2666 ปีที่แล้ว

    Hello Sir,
    Could you please create a video on cypress integration with git and Jenkins?
    Thanks

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      I will plan Zainab

  • @rajatgarg8142
    @rajatgarg8142 ปีที่แล้ว

    Hi , Can someone share details, how we can manage multiple tabs verification in Cypress, thank you.

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Rajat
      Cypress does not have a built-in way to manage multiple tabs. However, there are a few workarounds that you can use:
      * **Use the `cy.window()` command.** This command returns the current window object, which you can then use to get the list of open tabs. For example, the following code will get the title of the first tab:
      ```
      const title = cy.window().tabs()[0].title;
      ```
      * **Use the `cy.get()` command with the `target` option.** This option allows you to specify the target of a link or button. If the target is set to `_blank`, the link or button will open in a new tab. For example, the following code will click a link that opens in a new tab and then switch to that tab:
      ```
      cy.get('[href="/new-tab"]').click().then(() => {
      cy.window().tabs().then((tabs) => {
      cy.tab(tabs[1]);
      });
      });
      ```
      * **Use the `cy.waitUntil()` command.** This command allows you to wait until a certain condition is met. You can use this to wait until a new tab has been opened before continuing with your test. For example, the following code will wait until a new tab has been opened and then switch to that tab:
      ```
      cy.get('[href="/new-tab"]').click();
      cy.waitUntil(() => {
      return cy.window().tabs().length === 2;
      });
      cy.tab(1);```
      Which workaround you use will depend on the specific needs of your test.
      Here are some additional tips for managing multiple tabs verification in Cypress:
      * Use descriptive names for your tabs. This will make it easier to identify the tabs in your tests.
      * Use the `cy.log()` command to print the list of open tabs to the console. This can be helpful for debugging your tests.
      * Use the `cy.contains()` command to verify the content of a tab. This can be helpful for verifying that the correct tab has been opened.
      I hope this helps

  • @sokialkimera7243
    @sokialkimera7243 ปีที่แล้ว +1

    Hello Raghav, thank you for you very detailed course. As a very functional oriented QA tester, I used to be overwhelmed with all the things required/used in the automation domain and didn't know where to start. This course has proven to be very helpful as you went into every single step , showing the most basic ones - that I desperatly needed ! I scored an unexpected 18/20 ! I'll be sure to browse all your content as I'm sure to gain much skills from it. Thank you again !

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Great score Soki, all the best

  • @powerofcouple4517
    @powerofcouple4517 2 ปีที่แล้ว +1

    Well Explained Sir, Completed Master Class 1, Waiting for 2nd one. Thank you for alsways helping.

  • @sanalakshman1070
    @sanalakshman1070 10 หลายเดือนก่อน

    nice explanation sir , i have one query in cypress how to test dialog page in local using cypress if have project authorization

    • @RaghavPal
      @RaghavPal  10 หลายเดือนก่อน

      Sana
      Testing dialog pages with Cypress requires simulating user interactions and verifying the expected behavior. Since dialogs often involve authorization or restricted access, you'll need to handle authentication and navigation to the dialog page within your test scripts.
      Here's a general approach to testing dialog pages in Cypress with project authorization:
      1. **Implement Authentication:** If the dialog page requires authentication, you'll need to replicate the login process within your test script. This may involve entering credentials, handling redirects, and asserting successful authentication.
      2. **Navigate to Dialog Page:** Once authenticated, you'll need to navigate to the dialog page. This could involve clicking specific buttons, interacting with menus, or following specific URLs.
      3. **Verify Dialog Presence:** Once on the dialog page, verify that the dialog is indeed visible and interactable. You can use Cypress commands like `.should('be.visible')` to assert the presence of dialog elements.
      4. **Simulate User Interactions:** Simulate user interactions within the dialog, such as entering input values, clicking buttons, and selecting options. Use Cypress commands like `type()`, `click()`, and `select()` to perform these actions.
      5. **Verify Dialog Behavior:** Assert the expected behavior of the dialog based on user interactions. This may involve checking for error messages, success messages, or changes in the application state.
      6. **Handle Authorization Errors:** If authorization errors occur, handle them appropriately within your test script. You can assert the error messages and take corrective actions, such as re-entering credentials.
      7. **Clean Up:** After completing your test, perform any necessary cleanup, such as logging out or navigating back to a home page.
      Here's an example of a basic test script for testing a dialog page with project authorization:
      ```javascript
      describe('Dialog with Project Authorization', () => {
      beforeEach(() => {
      // Implement authentication (login)
      cy.visit('your-application.com/login');
      cy.get('#username').type('your-username');
      cy.get('#password').type('your-password');
      cy.get('#loginButton').click();
      // Navigate to dialog page
      cy.get('#openDialogButton').click();
      });
      it('should verify dialog presence and behavior', () => {
      // Verify dialog presence
      cy.get('#dialog').should('be.visible');
      // Simulate user interactions
      cy.get('#inputText').type('test input');
      cy.get('#submitButton').click();
      // Verify dialog behavior
      cy.get('#successMessage').should('be.visible');
      });
      afterEach(() => {
      // Clean up and logout
      cy.get('#logoutButton').click();
      });
      });
      ```
      Remember to adapt this example to your specific application and the complexity of your dialog page's behavior.

  • @PrateekSingh-xw3yo
    @PrateekSingh-xw3yo 7 หลายเดือนก่อน

    Can you suggest your tutorial for learning cypress for beginner level either places Udemy or youtube?

    • @RaghavPal
      @RaghavPal  7 หลายเดือนก่อน

      Prateek
      Can find here automationstepbystep.com/

  • @Aj21093
    @Aj21093 ปีที่แล้ว +1

    Hi Raghav, I can’t thank you enough for creating this amazing course. You know I didn’t have any experience in cypress and with your help, i was able to complete a take home test on cypress for my first interview round. They really liked my solution, i followed same approach you showed i.e. POM. Then i was even able to crack technical interview that was completely on cypress. They knew I didn’t have any experience in cypress but i was able to solve questions.
    After more than 1 years of job search in Canada, I got offer only because of your course. I’m so grateful to you. Thank you soooooo much for making these amazing courses, for your efforts and time you invest in providing this medium to people like us!

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      So happy to read your message Anukriti. Wish you all the best

    • @Aj21093
      @Aj21093 ปีที่แล้ว

      @@RaghavPal thanks a lot! 😊

    • @sokialkimera7243
      @sokialkimera7243 ปีที่แล้ว

      @@Aj21093 congratulations on your new job !

  • @shilpamittal2598
    @shilpamittal2598 ปีที่แล้ว

    Hi, I’m using the open command to open the cypress but it is getting crash it give’s me error Network service crash restarting service.

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Hi Shilpa,
      The "Network service crash restarting service" error message you are seeing when using the open command to launch Cypress may indicate that there is a problem with your network configuration or connectivity. Here are a few things you can try to resolve the issue:
      Check your network connection: Make sure that your computer is connected to a stable network with a strong signal. If you are using Wi-Fi, try restarting your router or modem and reconnecting to the network.
      Check for conflicting software: Sometimes, other software on your computer can conflict with Cypress and cause it to crash. Try closing any other applications that may be running in the background and see if that resolves the issue.
      Update Cypress: Make sure that you have the latest version of Cypress installed. You can update Cypress by running the following command in your project directory: npm update cypress.
      Clear your cache: Clear your browser's cache and Cypress's cache by running the following command in your project directory: npx cypress cache clear.
      Try a different browser: If you are using a browser other than Google Chrome, try switching to Chrome and see if that resolves the issue.
      If none of these steps resolve the issue, you may want to try reinstalling Cypress or seeking assistance from the Cypress community or support team

  • @vinethaa9316
    @vinethaa9316 ปีที่แล้ว

    I am learning cypress and created one test project in VS code. I need to add one real project but not able to find the option. Can you please let me know the steps how to add one new project?

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Hi Vinetha, you will find new project option in file

  • @harunurrashid4137
    @harunurrashid4137 ปีที่แล้ว

    Hi I am getting below error while i went to terminal and insert npm init -y:
    npm : The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
    included, verify that the path is correct and try again.
    At line:1 char:1
    + npm init -y
    + ~~~
    + CategoryInfo : ObjectNotFound: (npm:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

    • @harunurrashid4137
      @harunurrashid4137 ปีที่แล้ว

      While researching about the error found, turn off the terminal and start again and that worked for me. Thanks Raghab for the good work. You are saving everyone's professional life.

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      So happy to read this, All the best Rashid

  • @hileooo
    @hileooo ปีที่แล้ว

    Bro, your videos are really nice... to learn cypress is it a must to know Java SCript ?? please advise..

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      No, but you should be ready to learn the basics

  • @avinashkuwar2982
    @avinashkuwar2982 หลายเดือนก่อน

    Hey Raghav, I'm getting a "Webpack Compilation Error." Can you please help me out with this?

    • @RaghavPal
      @RaghavPal  หลายเดือนก่อน

      Avinash
      The Webpack Compilation Error typically occurs when there's an issue with the Webpack configuration or a problem with one of the dependencies. Here are some common causes:
      Invalid or missing Webpack configuration:
      Make sure you have a valid webpack.config.js file in the root of your project.
      Dependency conflicts:
      Ensure that all dependencies are compatible with each other
      Syntax errors in code:
      Check your code for any syntax errors, especially in the files that are being compiled by Webpack.
      Step-by-Step Troubleshooting
      1. Check the Error Message
      Carefully read the error message to identify the specific issue. Look for any file paths or line numbers that can help you pinpoint the problem.
      2. Verify Webpack Configuration
      Make sure you have a valid webpack.config.js file in the root of your project. If you're using a custom Webpack configuration, try commenting out any custom configurations to see if that resolves the issue.
      3. Check Dependencies
      Run the following command to check for any dependency conflicts:
      npm ls webpack
      This will show you the versions of Webpack and its dependencies. If you notice any conflicts, try updating or downgrading dependencies to resolve the issue.
      4. Run Cypress with Debug Mode
      Run Cypress with the --debug flag to get more detailed output:
      npx cypress run --debug
      This will provide more information about the error, which can help you identify the root cause.
      5. Check Code for Syntax Errors
      Review your code for any syntax errors, especially in the files that are being compiled by Webpack. Make sure to check for any typos or missing imports.
      Example Use Case
      If you're still having trouble, try creating a minimal reproducible example (MRE) to isolate the issue. Here's an example of a simple webpack.config.js file:
      // webpack.config.js
      module.exports = {
      module: {
      rules: [
      {
      test: /\.js$/,
      use: 'babel-loader',
      exclude: /node_modules/,
      },
      ],
      },
      };
      -

    • @avinashkuwar2982
      @avinashkuwar2982 หลายเดือนก่อน

      @@RaghavPal Thank you, Raghav🙂

  • @prabhattiwari432
    @prabhattiwari432 ปีที่แล้ว

    Getting certificate error while launching any URL from test script. Can you plz help

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Hi Prabhat, Pls check this stackoverflow.com/questions/60675180/cypress-invalid-certificate-issue-for-https-website

  • @JosedeLeon-z8m
    @JosedeLeon-z8m 7 หลายเดือนก่อน

    I followed all the steps in tthe video., done it several times , i still get "No test found. Help or I will loose my job.

    • @RaghavPal
      @RaghavPal  7 หลายเดือนก่อน

      Jose
      check the path of your test files.. try to add forward slashes / in the path.
      If you still face issues.. send me your commands and errors

  • @kowshighamaha3478
    @kowshighamaha3478 ปีที่แล้ว

    Hi,
    you are doing really good job..!
    I am currently stuck while configuring the browser, as only 'Edge' and 'Electron' options are available. How can I get the Chrome browser?
    but I have the chrome in my system.

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      To get the Chrome browser with Cypress, you can follow these steps:
      1. Install Chrome on your system.
      2. Open the Cypress command-line interface.
      3. Run the following command to create a new project:
      ```
      cypress init
      ```
      4. Open the `cypress.json` file in a text editor.
      5. In the `cypress.json` file, find the `browsers` section.
      6. In the `browsers` section, add the `chrome` browser.
      7. Save the `cypress.json` file.
      8. Run the following command to start Cypress:
      ```
      cypress open
      ```
      Cypress will now launch Chrome and you can start writing your tests.
      Here are some additional tips for configuring Cypress to use Chrome:
      * **Use the Cypress command-line interface:** The Cypress command-line interface can be used to create new projects, start Cypress, and run tests.
      * **Use the Cypress documentation:** The Cypress documentation can be used to learn more about Cypress, including how to configure Cypress to use different browsers.
      * **Use the Cypress community:** The Cypress community is a great resource for getting help with Cypress. You can find the Cypress community on Slack and Discord.
      Here are some additional details about each step:
      1. To install Chrome, you can download the installer from the Chrome website.
      2. To open the Cypress command-line interface, you can open a terminal window and navigate to the directory where you installed Cypress.
      3. To create a new project, you can run the `cypress init` command. This will create a new directory with the name `cypress` and a file called `cypress.json`.
      4. To find the `browsers` section in the `cypress.json` file, open the file in a text editor and look for the line that starts with `"browsers":`.
      5. To add the `chrome` browser to the `browsers` section, add the following line to the file:
      ```
      "chrome": {
      "command": "chrome"
      }
      ```
      6. Save the `cypress.json` file.
      7. To start Cypress, run the `cypress open` command. This will launch Cypress and open a new browser window.
      Once Cypress is started, you can start writing your tests. To learn more about writing Cypress tests, you can refer to the Cypress documentation.

    • @kowshighamaha3478
      @kowshighamaha3478 ปีที่แล้ว

      @@RaghavPal Thank you for helping me it worked.. Thank you so much 👍

  • @360-jatin6
    @360-jatin6 ปีที่แล้ว

    Sir is knowing javascript enough to get started with learning cyprus or should i also learn html and css also?

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      To get started with learning Cypress, it is helpful to have a good understanding of JavaScript. In fact, Cypress is built specifically for testing web applications using JavaScript.
      While having knowledge of HTML and CSS can be useful, it is not a requirement to get started with Cypress. However, as Cypress is used for testing web applications, having a basic understanding of HTML and CSS can help you understand the structure and styling of the web page you are testing.
      If you are completely new to web development, it may be helpful to learn some HTML and CSS basics before diving into Cypress. However, if you have some experience with JavaScript and programming concepts, you can start learning Cypress right away and pick up HTML and CSS as you go along.
      Ultimately, the more you know about web development, the easier it will be to use Cypress effectively. But if you have a good understanding of JavaScript, you can get started with Cypress without necessarily knowing HTML and CSS.

  • @shefalisharma1790
    @shefalisharma1790 ปีที่แล้ว +1

    Thanks for the demo. Do you have lectures on Detox automation as well?

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Not yet Shefali

  • @vineelakalipatnapu1489
    @vineelakalipatnapu1489 10 หลายเดือนก่อน

    Hello Raghav, Thanks for the detailed video on Cypress.
    At 1:00:52 we discussed on the "watchforfilechanges", but when I tried its still taking the changes made in our file and getting executed. What could be the reason for this?

    • @RaghavPal
      @RaghavPal  10 หลายเดือนก่อน

      Vineela
      To enable the `watchForFileChanges` flag in Cypress, you can either set it globally in your `cypress.json` file or locally within a specific test file.
      **Enabling `watchForFileChanges` Globally**
      1. Open your `cypress.json` file located at the root of your Cypress project.
      2. Locate the `e2e` configuration section.
      3. Add the `watchForFileChanges` option and set it to `true`. The updated configuration should look like this:
      ```json
      {
      "e2e": {
      "baseUrl": "localhost:3000",
      "specPattern": "cypress/e2e/**/*.{cy.js,cy.ts,cy.jsx,cy.tsx}",
      "watchForFileChanges": true
      }
      }
      ```
      With this configuration, Cypress will automatically re-run tests whenever a test file changes.
      **Enabling `watchForFileChanges` Locally**
      1. Open the specific test file where you want to enable `watchForFileChanges`.
      2. Add the following code block to the top of the test file:
      ```javascript
      describe('My Test Suite', () => {
      before(() => {
      Cypress.config({
      watchForFileChanges: true
      });
      });
      // Your test cases here
      });
      ```
      This code will enable `watchForFileChanges` for the specific test file and its nested test cases. Cypress will re-run the test file whenever any of the associated files change.

    • @vineelakalipatnapu1489
      @vineelakalipatnapu1489 10 หลายเดือนก่อน

      @@RaghavPal, Thank you

  • @shubhamjadhav2835
    @shubhamjadhav2835 ปีที่แล้ว

    hello sir right now i am working on cypress i got one error while run the test script that error is "'JQuery is not defined" how should i resolve this error

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Hi Shubham
      The "JQuery is not defined" error occurs when Cypress is unable to find the jQuery library. There are a few possible reasons why this might happen:
      * The jQuery library is not included in the HTML page that you are testing.
      * The jQuery library is not loaded before Cypress tries to use it.
      * The jQuery library is loaded in a different way than Cypress expects.
      To resolve the "JQuery is not defined" error, you need to make sure that the jQuery library is included in the HTML page that you are testing and that it is loaded before Cypress tries to use it.
      Here are some steps you can take to resolve the "JQuery is not defined" error:
      1. Check the HTML page that you are testing to make sure that the jQuery library is included. The jQuery library is typically included in the `` section of the HTML page.
      2. Make sure that the jQuery library is loaded before Cypress tries to use it. You can do this by adding the jQuery library to the `beforeEach()` hook in your Cypress tests.
      3. If you are using a different way to load the jQuery library, make sure that Cypress is expecting it to be loaded in that way. You can do this by setting the `jquery` property in your Cypress configuration file.
      Here is an example of how to set the `jquery` property in your Cypress configuration file:
      ```
      {
      "jquery": "cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"
      }
      ```
      Once you have made sure that the jQuery library is included and loaded in the correct way, the "JQuery is not defined" error should be resolved.
      I hope this helps

  • @saurabhsrivastav902
    @saurabhsrivastav902 ปีที่แล้ว

    Hi Raghav, can you help with a small video of how to handle the error "The snapshot is missing. Displaying current state of the DOM" The screenshots default gets captured for first 50 calls, beyond that I am getting this error. How can we explicitly capture screenshots and increase its numbers to capture more. If any links on the solutions please let me know.

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว +1

      Hi Saurabh,
      The error "The snapshot is missing. Displaying current state of the DOM" can occur when the number of snapshots taken in a single test exceeds the default limit of 50 snapshots.
      To explicitly capture screenshots and increase the number of snapshots, you can use the cy.screenshot() command. You can also increase the limit of snapshots per test by changing the snapshotLimit configuration in the cypress.json file or in the cypress.env.json file.
      {
      "snapshotLimit": 100
      }
      To capture a screenshot, you can use the following code:
      cy.screenshot('name-of-screenshot')
      This will take a screenshot of the current state of the DOM and save it with the specified name in the cypress/screenshots directory
      Note that increasing the snapshot limit may have an impact on the performance of your tests, so use it wisely

    • @saurabhsrivastav902
      @saurabhsrivastav902 ปีที่แล้ว

      @@RaghavPal superb Raghav, I needed it for debugging purpose. Will not use in test run. Exploring your master class 3. Superb. Coming up with few more questions. Thanks so much Raghav 👍✌

  • @Srj-my2xf
    @Srj-my2xf ปีที่แล้ว

    "Cypress could not detect tests in this file".I got the error message .Can you help me with that please?

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      The error message "Cypress could not detect tests in this file" usually indicates that Cypress was unable to find any tests to run in the specified file. Here are a few things you can check to resolve this error:
      Check that the file actually contains Cypress tests. Cypress tests are typically written using the describe() and it() functions. Make sure that these functions are being used in the file.
      Make sure that the file is located in the correct folder. Cypress expects test files to be located in the cypress/integration folder by default. If your test file is located elsewhere, you may need to configure Cypress to look for test files in that location.
      Check that the file name matches the naming convention. By default, Cypress looks for test files with names ending in *.spec.js or *.test.js. Make sure that the file you are trying to run matches this naming convention.
      Check that the file is included in the Cypress configuration. In your cypress.json configuration file, make sure that the file you are trying to run is listed under the integrationFolder property

  • @MyMediaVids
    @MyMediaVids 4 หลายเดือนก่อน

    maybe im missing something very obvious but running npm init or npm init -y is throwing errors at me - I can't get past it

    • @RaghavPal
      @RaghavPal  4 หลายเดือนก่อน

      If you are encountering errors while trying to initialize a new Node.js project with npm using `npm init` or `npm init -y`, there might be a few things going wrong. Here are some troubleshooting steps you can try to resolve the issue:
      1. Check Node.js Installation:
      - Ensure that Node.js is installed on your system and that you can run `node -v` and `npm -v` commands in your terminal to check the installed versions of Node.js and npm.
      2. Verify npm Installation:
      - Sometimes issues can occur if npm is not installed properly or is malfunctioning. Try reinstalling npm using a package manager like `npm` or `yarn`:
      ```
      npm install -g npm
      ```
      3. Check Current Directory:
      - Make sure you are in the correct directory where you want to initialize the project. Navigate to the desired directory using the `cd` command and then try running `npm init` or `npm init -y` again.
      4. Permissions:
      - Ensure you have the necessary permissions to create files in the directory where you are trying to initialize the project. If you are facing permissions issues, try running the command with elevated permissions (using `sudo` on Unix-based systems).
      5. Reinitialize npm:
      - If you have tried the above steps and are still facing issues, you can try resetting npm to its default settings by running the following command:
      ```
      npm set init.author.name ""
      npm set init.author.email ""
      npm set init.author.url ""
      npm set init.license "MIT"
      ```
      6. Check for Errors:
      - If you are getting specific error messages when running `npm init` or `npm init -y`, pay attention to those messages as they may provide clues on what is causing the problem. Share any relevant error messages for further assistance.
      By following these troubleshooting steps, you should be able to successfully initialize a new Node.js project using npm and proceed with setting up your Cypress project.
      --

  • @rajigopal864
    @rajigopal864 2 หลายเดือนก่อน

    Superb course, worthy watching... Thank you.

    • @RaghavPal
      @RaghavPal  2 หลายเดือนก่อน

      Glad it was helpful Raji

  • @mybook2837
    @mybook2837 ปีที่แล้ว

    Sir, cypress me search box me ek value search krke dropdown se select kr ke enter press krna h fir jo data aayega usko download pe click krke download krna h please bataye

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Hi,
      To enter a value in a search box and select from the auto-suggest dropdown in Cypress, you can use the following steps:
      Get a reference to the search box element:
      const searchBox = cy.get('input[name="search"]');
      Type in the search value:
      searchBox.type('value to search for');
      Wait for the auto-suggest dropdown to appear:
      cy.wait(500); // adjust this wait time based on your application
      Get a reference to the desired option from the auto-suggest dropdown:
      const desiredOption = cy.get('ul.autosuggest-list li').contains('desired option');
      Select the desired option:
      desiredOption.click();
      You can wrap these steps in a custom command or function to make it easier to reuse and make your tests more readable.

  • @SnapFootballSkils
    @SnapFootballSkils ปีที่แล้ว

    Hello Raghav or anyone here . Please request your inputs
    We have cypress in our company version 9. Now we need to migrate to new version. Which version we should upgrade to 10 or 12?

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Both Cypress 10 and 12 are good choices for upgrading from Cypress 9. However, there are some key differences between the two versions that you should consider before making a decision.
      Cypress 10
      * New features: Cypress 10 introduced a number of new features, including:
      * Test isolation: This feature ensures that each test runs in its own isolated environment, which can help to prevent test failures caused by shared state.
      * Component testing: This feature makes it easier to test individual components of a web application.
      * Enhanced debugging: Cypress 10 includes a number of enhancements to the debugging experience, such as the ability to step through code and inspect variables.
      *
      Cypress 12
      * Bug fixes: Cypress 12 includes a number of bug fixes that were not present in Cypress 10.
      * Performance improvements: Cypress 12 has been optimized for performance, which can lead to faster test execution times.
      * New commands: Cypress 12 introduces a number of new commands, such as cy.waitUntil() and cy.waitUntilFails().
      *
      Which version should you upgrade to?
      If you are looking for the latest features and bug fixes, then Cypress 12 is the better choice. However, if you are not concerned about the latest features and you want to minimize the risk of breaking your existing tests, then Cypress 10 is a good option.
      Ultimately, the decision of which version to upgrade to depends on your specific needs. If you are unsure, I recommend that you consult with your team to see what they recommend.

    • @SnapFootballSkils
      @SnapFootballSkils ปีที่แล้ว

      @@RaghavPal thanks

  • @khalidsiddiqui5830
    @khalidsiddiqui5830 9 หลายเดือนก่อน

    very nice way to teach, thanks a lot. I have one question not sure why, chrome and edge browsers open by default blank when run cypress test case? please can you tell me how can I resolve this issue? thanks again.

    • @RaghavPal
      @RaghavPal  9 หลายเดือนก่อน +1

      Khalid
      There are several reasons why Chrome and Edge browsers might open to a blank page when running Cypress test cases. Here are some possible causes and solutions:
      **1. Test Isolation:**
      * Starting from Cypress v12, test isolation is enabled by default. This ensures each test runs in a clean environment, preventing interference from previous tests.
      * As a consequence, the browser will start with a blank page before each test executes.
      * If your test case doesn't explicitly visit the desired URL, the browser will remain blank.
      **Solution:**
      * Explicitly visit the URL within your test case using `cy.visit()` command.
      * For example, you could add this line at the beginning of your test:
      ```javascript
      cy.visit('your-website-url');
      ```
      **2. Browser Extensions:**
      * Some browser extensions might interfere with Cypress and prevent it from properly controlling the browser.
      * These extensions could block automation, manipulate the DOM, or interact with the browser in unexpected ways.
      **Solution:**
      * Try disabling all browser extensions before running your Cypress tests.
      * If the issue resolves, identify the problematic extension and disable it permanently or whitelist Cypress for specific domains.
      **3. Cypress Configuration:**
      * Improper Cypress configuration settings could cause unexpected behavior, including blank pages.
      * Double-check your Cypress configuration file (`cypress.config.js`) for any errors or conflicting settings.
      **Solution:**
      * Ensure your `cypress.config.js` file is valid and adheres to the current Cypress version.
      * Refer to the official Cypress documentation for configuration options and best practices.
      **4. Browser Cache and Cookies:**
      * Cached browser data and cookies might interfere with test execution and cause unexpected behavior.
      * Cypress might not be able to clear the cache or cookies effectively, leading to issues like blank pages.
      **Solution:**
      * Clear your browser cache and cookies before running Cypress tests.
      * Alternatively, you can configure Cypress to automatically clear browser data before each test.
      **5. Underlying System Issues:**
      * In some cases, underlying system issues like insufficient resources or corrupted files could cause Cypress to malfunction.
      **Solution:**
      * Check your system resources like CPU, RAM, and disk space to ensure they meet the required specifications for running Cypress.
      * Verify your Cypress installation is complete and free of errors.
      * Consider reinstalling Cypress if necessary.
      **Here are some additional tips for troubleshooting:**
      * Review the Cypress logs for any errors or warnings related to the browser opening a blank page.
      * Check the Cypress documentation and community forums for similar issues and solutions.
      * If none of the above solutions work, consider reporting the issue to the Cypress team with detailed information about your test setup and environment.
      By systematically analyzing the possible causes and implementing the appropriate solutions, you should be able to resolve the issue of Chrome and Edge opening a blank page when running Cypress test cases.

    • @khalidsiddiqui5830
      @khalidsiddiqui5830 9 หลายเดือนก่อน

      @@RaghavPal, Thank you so much for your kindly reply, I'll check all solutions and will let you know.. Thanks again.

  • @ajeetakrishna4313
    @ajeetakrishna4313 ปีที่แล้ว

    hi Raghav, could you please tell which version added the feature where we do not need to write the require("cypress").. for code completion?

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Hi Ajeeta,
      You can add the following comment to the top of your Cypress test file:
      ///
      You can also Install the @types/cypress package as a development dependency using npm or yarn:
      npm install --save-dev @types/cypress

    • @ajeetakrishna4313
      @ajeetakrishna4313 ปีที่แล้ว

      Hi, I looked up for it and I think its 10th version which had this code placed in cypress.config.json file and we don't need to write on top of our script page. Your videos are so helpful in understanding basics, I guess thank you isn't enough but still thank you, I appreciate your replies!

  • @amritsharma9181
    @amritsharma9181 ปีที่แล้ว +1

    i didnt know anything about automation testing or cypress but you explained it so clearly the basics that it took only one video to get into it. thanks alot.

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Most welcome Amrit

  • @abhijeet19403
    @abhijeet19403 6 หลายเดือนก่อน

    Your videos are so amazing. I got 10/10 in the quiz.

    • @RaghavPal
      @RaghavPal  6 หลายเดือนก่อน

      Excellent Abijeet

  • @pavithrav8272
    @pavithrav8272 9 หลายเดือนก่อน

    Hi Raghav,
    Thank you very much for a wonderful video on cypress. But, I have a question to you. How to test lightning based applications using Cypress? As the lightning based applications doesn’t have Id, name or xpath for each component on the application page.
    Please guide me on this.

    • @RaghavPal
      @RaghavPal  9 หลายเดือนก่อน

      Pavithra
      You're right, testing Lightning Web Components (LWCs) in Lightning applications with Cypress poses challenges due to their dynamic nature and lack of traditional identifiers like IDs and names. But fear not, several strategies can help you overcome these obstacles and effectively test your Lightning apps. Here's a guide to get you started:
      1. Embrace Data Attributes:
      LWCs often use custom data attributes like data-aura-id, data-lwc-id, or specific attributes related to their functionality. Cypress offers cy.get('data-aura-id=your-id') to locate them based on these attributes.
      2. Get Creative with Cypress Selectors:
      Go beyond IDs and names! Use CSS selectors based on class names, tag names, and element attributes with methods like cy.get and cy.contains. Combine these with :nth-child or advanced selectors to precisely target specific components within your app.
      3. Dive into Shadow DOM:
      LWCs utilize Shadow DOM for encapsulation, making them invisible to standard DOM interactions. Cypress provides cy.shadowDom to access elements within their Shadow DOM. This allows you to directly interact with Lightning components even without visible identifiers.
      4. Leverage Lightning Web Components APIs:
      APIs like getElementForName and querySelector exist within LWCs. Cypress allows calling these APIs from your tests for programmatic location and interaction based on internal identifiers, offering even greater control.
      5. Consider Component Testing Libraries:
      Libraries like salesforce-lwc-testing and lwc-jest focus specifically on LWC testing. They provide custom Cypress commands and utilities to simplify element identification and interaction, making testing LWCs a breeze.
      6. Employ Cypress Waits:
      Remember, Lightning apps are dynamic. Elements might take time to render. Use Cypress wait methods like cy.wait or cy.get.should('be.visible') to ensure elements are ready before interacting with them in your tests.
      7. Practice Cypress Best Practices:
      Write modular and reusable test cases, focus on user workflows, and adopt data-driven testing for efficiency and maintainability. These best practices apply to any Cypress testing scenario, so keep them in mind.

    • @pavithrav8272
      @pavithrav8272 8 หลายเดือนก่อน

      Hi Raghav,
      I tried few of the suggestions you made like trying to use data attributes like aura_id. Tried using shadow DOM but looks like our application doesn’t show any shadow DOM. I used various other best practices suggested by cypress documentation but no luck.
      Could you please help me in having a look at our application via zoom call or google meet call?

    • @RaghavPal
      @RaghavPal  8 หลายเดือนก่อน

      will not be able to do a call. Can try some online resources and help

  • @danishmerchant7986
    @danishmerchant7986 ปีที่แล้ว

    npm ERR! code EPERM
    npm ERR! syscall mkdir
    npm ERR! path D:\CypressProject\firstProject
    ode_modules
    npm ERR! errno -4048
    npm ERR! Error: EPERM: operation not permitted, mkdir 'D:\CypressProject\firstProject
    ode_modules'
    npm ERR! [Error: EPERM: operation not permitted, mkdir 'D:\CypressProject\firstProject
    ode_modules'] {
    npm ERR! errno: -4048,
    npm ERR! code: 'EPERM',
    npm ERR! syscall: 'mkdir',
    npm ERR! path: 'D:\\CypressProject\\firstProject\
    ode_modules'
    npm ERR! }
    npm ERR!
    npm ERR! The operation was rejected by your operating system.
    npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
    npm ERR! or that you lack permissions to access it.
    npm ERR!
    npm ERR! If you believe this might be a permissions issue, please double-check the
    npm ERR! permissions of the file and its containing directories, or try running
    npm ERR! the command again as root/Administrator.
    npm ERR! A complete log of this run can be found in:
    npm ERR! C:\Users\User\AppData\Local
    pm-cache\_logs\2022-12-15T05_37_08_159Z-debug-0.log
    Facing this error while installing cypress

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Run cmd as administrator
      Uninstall Cypress
      npm uninstall cypress
      then install again
      npm install cypress

  • @JosedeLeon-z8m
    @JosedeLeon-z8m 7 หลายเดือนก่อน

    I ttthink I got it, so everytime i run a new test, I have to repeat all the process/steps?

    • @RaghavPal
      @RaghavPal  7 หลายเดือนก่อน

      will need more details on this