Path: blob/main/files/en-us/web/webdriver/errors/invalidargument/index.md
6517 views
------{{QuickLinksWithSubpages("/en-US/docs/Web/WebDriver/Errors")}}
The invalid argument error is a WebDriver error that occurs when the arguments passed to a command are either invalid or malformed.
Invalid argument errors can be likened to TypeErrors in JavaScript, in that they can occur for a great many APIs when the input value is not of the expected type or malformed in some way. See the type- and bounds constraints for each WebDriver command.
Example
It is for example not possible to set a window size to a negative value:
Output: