Validate.NotExists vs 'Failed to find item'
Posted: Tue Jan 29, 2019 1:32 pm
I have to check the existence of an element on WebPage - element should not be visible.
If i write following code:
(...)
Validate.NotExists(repo.Folder.ElementName);
(...)
or
var Element1= repo.(...);
Validate.NotExists(Element1);
Result is Error: Failed to find item '(...)'.
No element found for path '(...)'
Test should prove that element does not exist, but if the element does not exist test will fail.
How to handle this situation in code ?
If i write following code:
(...)
Validate.NotExists(repo.Folder.ElementName);
(...)
or
var Element1= repo.(...);
Validate.NotExists(Element1);
Result is Error: Failed to find item '(...)'.
No element found for path '(...)'
Test should prove that element does not exist, but if the element does not exist test will fail.
How to handle this situation in code ?