Getting Error "error":"invalid argument","message":"unhandledPromptBehavior" In Headless Mode


My tests for headless mode in are failing for FireFox with the error message “error”:“invalid argument”,“message”:“unhandledPromptBehavior” . Is there any other way to handle this ?

Thank you

1 Like

Hello Rebecca,

This is due to “unexpectedAlertBehaviour”: string"accept" capability. You can try adding the capability as “chrome_options.set_capability(‘unhandledPromptBehavior’, ‘accept’)” . This would help you run the tests easily.


1 Like