Similarly to this question. How add two values[1,2 elements] and verify its equal to result[3 element]
from the below HTML structure I need to add A(element) & B(element) and verify the sum is equal to A+B(element) its complex for me since A & B are dynamic and they can or cannot be present depending on the changes from the user.
I tried to use the below script.
cy.get('[data-cy="Selected in Final InterviewofferBreakUpTableBodyCellRenderer"] >span').invoke('text')
But it's yielding both the text, i only need the number.
I need help in making a test that won't fail even if only one element A or B is present.