# I want to change a fail to pass and pass to fail

**URL:** <https://forum.robotframework.org/t/i-want-to-change-a-fail-to-pass-and-pass-to-fail/3637>\
**Category:** Robot Framework\
**Created:** [17 April 2022 14:47 UTC](https://forum.robotframework.org/t/i-want-to-change-a-fail-to-pass-and-pass-to-fail/3637 "2022-04-17T14:47:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tigetiiger](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/tigetiiger/32/1441_2.png) [@Tigetiiger](https://forum.robotframework.org/u/Tigetiiger)\
**Post date:** [17 April 2022 14:47 UTC](https://forum.robotframework.org/t/i-want-to-change-a-fail-to-pass-and-pass-to-fail/3637/1 "2022-04-17T14:47:11Z")

</div>

So I want to check that the website isn’t allowing anyone to do something, basically If the test case can’t do something it should pass. I don’t know how to do that and I couldn’t find anything like that anywhere else.

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [17 April 2022 23:24 UTC](https://forum.robotframework.org/t/i-want-to-change-a-fail-to-pass-and-pass-to-fail/3637/2 "2022-04-17T23:24:39Z")

</div>

Hi @Tigetiiger,

[Run Keyword And Expect Error](https://robotframework.org/robotframework/latest/libraries/BuiltIn.html#Run%20Keyword%20And%20Expect%20Error) is what you are probably after. You can even make it fail if it doesn’t get the error you were expecting to get but some other different error.

Dave.
