Interface APIResponseAssertions
-
public interface APIResponseAssertionsTheAPIResponseAssertionsclass provides assertion methods that can be used to make assertions about theAPIResponsein the tests.{@code ... import static com.microsoft.playwright.assertions.PlaywrightAssertions.assertThat; public class TestPage { ...
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidisOK()Ensures the response status code is within200..299range.APIResponseAssertionsnot()Makes the assertion check for the opposite condition.
-
-
-
Method Detail
-
not
APIResponseAssertions not()
Makes the assertion check for the opposite condition. For example, this code tests that the response status is not successful:assertThat(response).not().isOK();- Since:
- v1.20
-
isOK
void isOK()
Ensures the response status code is within200..299range.Usage
assertThat(response).isOK();- Since:
- v1.18
-
-