You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i used the below code with your library so that if visible it grabs the text in these elements and wraps them in a variable
cy.get(app-target-taxonomies-toolbar span:nth-child(1) span").if('visible').invoke('text').then(tagTextDisplayed => {
cy.wrap(tagTextDisplayed.trim()).as('tagTextDisplayed1').else().log("No tag present")
})
cy.get(app-target-taxonomies-toolbar span:nth-child(2) span").if('visible').invoke('text').then(tagTextDisplayed => {
cy.wrap(tagTextDisplayed.trim()).as('tagTextDisplayed2').else().log("No tag present")
})
cy.get(app-target-taxonomies-toolbar span:nth-child(3) span").if('visible').invoke('text').then(tagTextDisplayed => {
cy.wrap(tagTextDisplayed.trim()).as('tagTextDisplayed3').else().log("No tag present")
})
In my test only 2 of the 3 tags are displayed
Expected Results : Find the 2 present tags and wrap the variable , the 1 missing tag is logged as as "No tag present"
Actual Result: Finds the 2 present tags but chokes on the missing tag.
The text was updated successfully, but these errors were encountered:
Looks like a compatibility issue, updated to your latest (that has v11 compatibility changes) and it works as expected even with 'visible' :) you can close the issue
I have 3 elements that appear depending on the test that use the locators
"app-target-taxonomies-toolbar span:nth-child(1) span"
"app-target-taxonomies-toolbar span:nth-child(2) span"
"app-target-taxonomies-toolbar span:nth-child(3) span"
i used the below code with your library so that if visible it grabs the text in these elements and wraps them in a variable
In my test only 2 of the 3 tags are displayed
Expected Results : Find the 2 present tags and wrap the variable , the 1 missing tag is logged as as "No tag present"
Actual Result: Finds the 2 present tags but chokes on the missing tag.
The text was updated successfully, but these errors were encountered: