The same behavior as the other elements (not containing SVG): a simple click.
describe("test click on svg", () => {
beforeEach( () => {
cy.visit('/');
it( "clicks a span containing text", () => {
cy.get("#test-text").click();
it( "clicks a span containing SVG", () => {
cy.get("#test-svg").click();
I obtain this result:
My current workaround:
Cypress.Commands.overwrite("click", (originalFn, subject, options = {}) => {
if( subject[ 0 ].getElementsByTagName('svg').length ) {
Object.assign( options, { force: true } );
return originalFn(subject, options);
Versions
Cypress 3.0.3, Windows 7, Chrome v 67.0.3396.99
On a side note, Cypress is great !
This has already been fixed in a PR and will go out in the next patch release... approximately less than 24 hours.
#2246