diff --git a/src/canopy/canopy.fs b/src/canopy/canopy.fs index 7ce10b10..ddd5716c 100644 --- a/src/canopy/canopy.fs +++ b/src/canopy/canopy.fs @@ -470,6 +470,10 @@ let contains (value1 : string) (value2 : string) = if (value2.Contains(value1) <> true) then raise (CanopyContainsFailedException(sprintf "contains check failed. %s does not contain %s" value2 value1)) +let notContains (value1 : string) (value2 : string) = + if (value2.Contains(value1) = true) then + raise (CanopyNotContainsFailedException(sprintf "notContains check failed. %s does contain %s" value2 value1)) + let count cssSelector count = try wait compareTimeout (fun _ -> (unreliableElements cssSelector).Length = count) diff --git a/src/canopy/types.fs b/src/canopy/types.fs index 4481926b..cce94d16 100644 --- a/src/canopy/types.fs +++ b/src/canopy/types.fs @@ -20,6 +20,7 @@ type CanopyNotEqualsFailedException(message) = inherit CanopyException(message) type CanopyValueNotInListException(message) = inherit CanopyException(message) type CanopyValueInListException(message) = inherit CanopyException(message) type CanopyContainsFailedException(message) = inherit CanopyException(message) +type CanopyNotContainsFailedException(message) = inherit CanopyException(message) type CanopyCountException(message) = inherit CanopyException(message) type CanopyDisplayedFailedException(message) = inherit CanopyException(message) type CanopyNotDisplayedFailedException(message) = inherit CanopyException(message)