I have a button that has text "power off". when I run cy.get('button').eq(1).if().contains('power_off').click(), the code will run with and without if().
Then when i tried to run "power on" (power on doesn't exist) : cy.get('button').eq(1).if().contains('power_on').click()I got the below error:
AssertionError: Timed out retrying after 4000ms: Expected to find content: 'power_on' within the element: but never did.
Based on the example provided: cy.get('dialog#survey').if().contains('button', 'Close').click(), wouldn't the rest of the if command skipped since i don't have 'power on'?
I have a button that has text "power off". when I run
cy.get('button').eq(1).if().contains('power_off').click()
, the code will run with and without if().Then when i tried to run "power on" (power on doesn't exist) :
cy.get('button').eq(1).if().contains('power_on').click()
I got the below error:AssertionError: Timed out retrying after 4000ms: Expected to find content: 'power_on' within the element: but never did.
Based on the example provided:
cy.get('dialog#survey').if().contains('button', 'Close').click()
, wouldn't the rest of the if command skipped since i don't have 'power on'?