Tengo una lista de elementos en la tabla, cada elemento tiene una imagen, activa (azul) y no activa (negra), ¿cómo hago esta consulta para ciprés?
Esta es la imagen de la lista de tablas: 
Entonces este es el código html para la tabla: 
Cuando se expande, la imagen está debajo, tiene una ruta src de /static/images/icon_profile.png 
Mi prueba actual es así:
it('Should create a legal form of a Customer profile', ()=>{ cy.get('th').eq(50).find('img').should('have.attr', 'src', '/static/images/icon_profile.png').first().click() })Pero cuando lo ejecuto me sale este error:
Puedes hacerlo más fácilmente combinando selectores
cy.get('tr img[src="/static/images/icon_profile.png"]') .first() .parent('a') // click the link not the img .click() Para confirmar que tiene el índice correcto cuando usa .eq(50) ejecute
cy.get('tr img[src="/static/images/icon_profile.png"]') .first() .parent('tr') .invoke('index') // which row is it? .log()puedes hacer algo como esto
cy.get('tr').each(($ele) => { if ($ele.attr('src') == '/static/images/icon_profile.png') { cy.wrap($ele).parent('a').click() } })