diff --git a/bin/accessibility-automation/cypress/index.js b/bin/accessibility-automation/cypress/index.js index 613e3a35..8b2d1290 100644 --- a/bin/accessibility-automation/cypress/index.js +++ b/bin/accessibility-automation/cypress/index.js @@ -424,7 +424,10 @@ Cypress.Commands.add('getAccessibilityResults', () => { } }); -Cypress.Commands.addQuery('performScanSubjectQuery', function (chaining, setTimeout) { - this.set('timeout', setTimeout); - return () => cy.getSubjectFromChain(chaining); -}); +if (!Cypress.Commands.hasOwnProperty('_browserstackSDKQueryAdded')) { + Cypress.Commands.addQuery('performScanSubjectQuery', function (chaining, setTimeout) { + this.set('timeout', setTimeout); + return () => cy.getSubjectFromChain(chaining); + }); + Cypress.Commands._browserstackSDKQueryAdded = true; +}