When attempting to compare two values within a page and make an assertion, my goal is to retrieve the value of one text element and compare it with another value on the same page. While I find this process straightforward in Java/selenium, achieving the same in JavaScript is proving more challenging. Cypress appears to be less flexible in facilitating this comparison.