File tree Expand file tree Collapse file tree
src/test/java/io/github/mfaisalkhatri/tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package io .github .mfaisalkhatri .tests ;
2+
3+ import com .microsoft .playwright .Browser ;
4+ import com .microsoft .playwright .BrowserType ;
5+ import com .microsoft .playwright .Page ;
6+ import com .microsoft .playwright .Playwright ;
7+ import org .testng .annotations .AfterClass ;
8+ import org .testng .annotations .BeforeClass ;
9+
10+ public class ClickOperationTests {
11+
12+ private Playwright playwright ;
13+ private Page page ;
14+
15+ @ BeforeClass
16+ public void setup () {
17+ this .playwright = Playwright .create ();
18+ Browser browser = playwright .chromium ().launch (new BrowserType .LaunchOptions ().setHeadless (false )
19+ .setChannel ("chrome" ));
20+ this .page = browser .newPage ();
21+ }
22+
23+
24+
25+
26+ @ AfterClass
27+ public void tearDown () {
28+ this .page .close ();
29+ this .playwright .close ();
30+ }
31+ }
You can’t perform that action at this time.
0 commit comments