5. Maven Dependency Management & Project Structure

Adding Playwright to pom.xml

<dependencies>
    <dependency>
        <groupId>com.microsoft.playwright</groupId>
        <artifactId>playwright</artifactId>
        <version>1.49.0</version>
    </dependency>
    <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter</artifactId>
        <version>5.11.0</version>
        <scope>test</scope>
    </dependency>
</dependencies>

Standard Directory Layout:

src/
├── main/java/ # Reusable Page Objects and Utilities
└── test/java/ # Test Specs (e.g., LoginTest.java)

Task

  • Implement isPlaywrightGroup:
  • 1. Accept String groupId.
  • 2. Return true if groupId equals "com.microsoft.playwright".
💡Common doubts
Did you like the problem?
Lesson 5 of 18
Java
Loading code editor…
Next