Skip to content

Commit f75d1b0

Browse files
committed
add callout about error
1 parent 091695e commit f75d1b0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/api/cypress-api/custom-commands.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,17 @@ Log? Read more about [Command Logging](#Command-Logging).
315315

316316
:::
317317

318+
:::caution
319+
320+
Note that `Cypress.Commands.add()` will throw an error when trying to add a
321+
custom command with the same name as an existing built-in Cypress command or
322+
reserved internal function. In order to override the behavior of an existing
323+
command, `Cypress.Commands.overwrite()` should be used instead. For more
324+
information, read the section
325+
[Overwrite Existing Commands](#Overwrite-Existing-Commands).
326+
327+
:::
328+
318329
### Child Commands
319330

320331
Child commands are always chained off of a **parent** command, or another

0 commit comments

Comments
 (0)