StrictModeViolationException Class
A locator finds more than one element where the action or the assertion needs exactly one (the strict mode of Playwright). Make the locator more specific, or use Locator.First, Locator.Last or Locator.Nth.
public sealed class StrictModeViolationException : Exception- Inheritance
ExceptionStrictModeViolationException
Constructors
| Name | Description |
|---|---|
| StrictModeViolationException() | Initializes a new instance of the StrictModeViolationException class. |
| StrictModeViolationException(string) | Initializes a new instance of the StrictModeViolationException class. |
| StrictModeViolationException(string, Exception) | Initializes a new instance of the StrictModeViolationException class. |
StrictModeViolationException overloads
StrictModeViolationException()
StrictModeViolationException.csInitializes a new instance of the StrictModeViolationException class.
public StrictModeViolationException()StrictModeViolationException(string)
StrictModeViolationException.csInitializes a new instance of the StrictModeViolationException class.
public StrictModeViolationException(string message)Parameters
messagestring- The message.
StrictModeViolationException(string, Exception)
StrictModeViolationException.csInitializes a new instance of the StrictModeViolationException class.