I was wondering if it was possible to compare two page.locator values.
Ex. Say I have a product number that I store in a variable (ex. const poNumber = page.locator(xpath to element
). I want to take this value and compare it with another page.locator value. Would this be possible
You could do it like this with assertions:
Or:
Or just take both values and do a string comparision: