Advertisement
deddyprianto

cypress testing deep

May 13th, 2024 (edited)
612
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   cy.get("div#groupingSearchItem")
  2.       .first()
  3.       .then(($element) => {
  4.         const objHtml = $element[0];
  5.         const nameGroupItemSearchElement = objHtml.querySelector(
  6.           "#nameGroupItemSearch",
  7.         );
  8.         const buttonAdd = objHtml.querySelector("button.justify-center");
  9.         cy.get(buttonAdd).should("be.visible").click();
  10.         cy.get(nameGroupItemSearchElement).contains("Western");
  11.       });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement