From 0c517d9d72ed6bdd31de6c4fdf7877ea1e23adf4 Mon Sep 17 00:00:00 2001 From: Kostiantyn Dvornik Date: Mon, 15 Apr 2024 15:15:13 +0300 Subject: [PATCH] update: new browser methods --- src/js/cypress/Browser.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/js/cypress/Browser.ts b/src/js/cypress/Browser.ts index d7c9803..19dbda1 100644 --- a/src/js/cypress/Browser.ts +++ b/src/js/cypress/Browser.ts @@ -226,4 +226,16 @@ export class Browser { $el[0].dispatchEvent(event); }); } + + check(selector: string) { + cy.get(selector).check(); + } + + uncheck(selector: string) { + cy.get(selector).uncheck(); + } + + getAttribute(selector: string, attribute: string) { + return cy.get(selector).invoke("attr", attribute); + } }