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
In the above snippet I am grabbing two different elements in my code:
cy.get('#questionsgrid input.k-checkbox').then($topMatrix_checkboxes => {
cy.log('found the checkbox')
})
cy.get('#questionsgrid textarea.k-textbox').then($topMatrix_comments => {
cy.log('found the textarea')
})
Notice the elements I am trying to select are nested in the table very similarly, and the selector format I am using to grab is also identical. Only the checkbox is being found. The textarea is not.
After researching I cleaned up the selectors to something more robust. For the textarea I tried:
cy.get(textarea[asp-for="Comments"]).then($topMatrix_comments => {
cy.log('found the textarea')
})
But the textarea was still not found so I then tried to use the "suggested selector" that Cypress gives when you click on an element in its interface.
This is what I ended with:
cy.get('.k-detail-cell > .k-textbox').then($topMatrix_comments => {
cy.log('found the textarea')
})
But it is still not finding the textbox.
"AssertionError: Timed out retrying after 4000ms. k-detail-cell > .k-textbox , but never found it."
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I am having trouble with selecting an element which is just eluding me since I have a similar selector for an element nearby that works just fine.
First, the HTML, simplified as best as I thought relevant:
In the above snippet I am grabbing two different elements in my code:
Notice the elements I am trying to select are nested in the table very similarly, and the selector format I am using to grab is also identical. Only the checkbox is being found. The textarea is not.
After researching I cleaned up the selectors to something more robust. For the textarea I tried:
But the textarea was still not found so I then tried to use the "suggested selector" that Cypress gives when you click on an element in its interface.
This is what I ended with:
But it is still not finding the textbox.
"AssertionError: Timed out retrying after 4000ms. k-detail-cell > .k-textbox , but never found it."
Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions