How I Create Page Objects (In Cypress)

Поделиться
HTML-код
  • Опубликовано: 2 фев 2025

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

  • @danr4826
    @danr4826 2 дня назад +1

    Love Cypress real time reload 💯

    • @gleb
      @gleb  2 дня назад +1

      yup, and check out github.com/bahmutov/cypress-watch-and-reload to reload the tests when the application's source files change

  • @AutomationwithMaksu
    @AutomationwithMaksu 12 часов назад

    Really useful. Thanks!
    I am using classes instead of const for my page objects. And I also crate abstract parent classes which can be extended from other page objects which share similar functionalities etc. Even though this is kind of usefull, it also adds more complexity to the code.
    Is there a good way to do the same with your approach? Or would you prefer having code duplication instead?

  • @rakkleshnya951
    @rakkleshnya951 2 дня назад +1

    What's your opinion on POM using cypress? Does one even need it on a project? Cypress itself is pretty optimized in terms of methods it provides, as well as external packages (like yours). Taking in account most tests are pretty short and refactoring such would makes you spend extra time

    • @gleb
      @gleb  День назад

      I use it once I have more tests and need to abstract the details for each page.