From 2306f84ce9342a9f3db756a5c201f71f4af1532b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Greffier?= Date: Thu, 29 Feb 2024 21:29:11 +0100 Subject: [PATCH] Update docs/src/junit-java.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Yury Semikhatsky Signed-off-by: Jean-François Greffier --- docs/src/junit-java.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/junit-java.md b/docs/src/junit-java.md index 99cff9ff39..c92e7f011e 100644 --- a/docs/src/junit-java.md +++ b/docs/src/junit-java.md @@ -125,7 +125,7 @@ Since it is not safe to use same Playwright objects from multiple threads withou instance per thread and use it on that thread exclusively. Here is an example how to run multiple test classes in parallel. Use [`@TestInstance(TestInstance.Lifecycle.PER_CLASS)`](https://junit.org/junit5/docs/current/api/org.junit.jupiter.api/org/junit/jupiter/api/TestInstance.html) -annotation to make JUnit create one instance of a class for all test methods within that class (by default each JUnit will create a new instance of the class +annotation to make JUnit create one instance of a class for all test methods within that class (by default JUnit will create a new instance of the class for each test method). Store [Playwright] and [Browser] objects in instance fields. They will be shared between tests. Each instance of the class will use its own copy of Playwright. This is done automatically if you use the `@UsePlaywright` JUnit annotation.