Thx Sir Pavan, I am very grateful for your videos!
this commands has crushed my cypress app.
now this works Cypress.Commands.overwriteQuery( "contains", function (contains, filter, text, userOptions = {}) { // This is parameter resolution from Cypress v12.7.0 source if (Cypress._.isRegExp(text)) { // .contains(filter, text) // Do nothing } else if (Cypress._.isObject(text)) { // .contains(text, userOptions) userOptions = text text = filter filter = '' } else if (Cypress._.isUndefined(text)) { // .contains(text) text = filter filter = '' } userOptions.matchCase = false; let contains0 = contains.bind(this) // this line fixes the error return contains0(filter, text, userOptions) } )
Thank you so much sir
Thank sir! Nice video❤️
TQ,Sir, nice expansion,please provide Cypress meterial
I am getting this error Argument of type '(a: string, b: any, c: string) => void' is not assignable to parameter of type 'CommandFn<"name">'.
Hello Sir I am getting errors for overwriting contains() command CypressError The following error originated from your test code, not from Cypress. > Cannot overwrite the contains the query. Queries cannot be overwritten. When Cypress detects uncaught errors originating from your test code it will automatically fail the current test. Cypress could not associate this error with any specific test. We dynamically generated a new test to display this failure. Learn more Hoping for your reply soon!
@Jaskierify 1 month ago Unfortunately last two custom commands (overwrite/login app) result in cypress error: Cannot read properties of undefined (reading 'hasPreviouslyLinkedCommand') I did exactly the same way as presented in the video. i am also facing this error could you help me resolve
Sir now cypress shows error for that over write - ut says cannot overwrite the contains query.querries can be overwritten with with Cypress.Commands.overwriteQuerry().
Unfortunately last two custom commands (overwrite/login app) result in cypress error: Cannot read properties of undefined (reading 'hasPreviouslyLinkedCommand') I did exactly the same way as presented in the video.
Thanks Sir for great video. I am getting issue with over writing command contains even through I wrote the code like you. I got the message following error: An uncaught error was detected outside of a testfailed No commands were issued in this test. CypressError The following error originated from your test code, not from Cypress. > Cannot overwite the contains query. Queries cannot be overwritten. When Cypress detects uncaught errors originating from your test code it will automatically fail the current test. Cypress could not associate this error to any specific test. We dynamically generated a new test to display this failure Hoping for your reply soon!
hi sir while accessing custom commands in main file im getting a type erroe ( TypeError: cy.login is not a function ) can you please help me
At time 34:41, you have added cy.wait(3000). What is the point of adding static wait when cypress supports autowait and auto synchronisation?
I need your help, i writing similar command to get value from textbox by return value but not success, can you help me
Hello Sir I am getting error for over writing contains() command CypressError The following error originated from your test code, not from Cypress. > Cannot overwite the contains query. Queries cannot be overwritten. When Cypress detects uncaught errors originating from your test code it will automatically fail the current test. Cypress could not associate this error to any specific test. We dynamically generated a new test to display this failure.Learn more
Got this error while overwriting custom commands "An uncaught error was detected outside of a test" I made a separate video for upcoming folks. https://youtu.be/jmLKhZRojQc
Video is not clear sir
@QATester-j6t