0
0
Selenium Javatesting~10 mins

Maven project creation in Selenium Java - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to specify the packaging type in the Maven <project> file.

Selenium Java
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.example</groupId>
  <artifactId>selenium-test</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>[1]</packaging>
</project>
Drag options to blanks, or click blank then click option'
Azip
Bwar
Cexe
Djar
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'war' packaging which is for web applications.
Using unsupported packaging types like 'exe' or 'zip'.
2fill in blank
medium

Complete the dependency tag to add Selenium Java to the Maven <dependencies> section.

Selenium Java
<dependency>
  <groupId>org.seleniumhq.selenium</groupId>
  <artifactId>[1]</artifactId>
  <version>4.10.0</version>
</dependency>
Drag options to blanks, or click blank then click option'
Aselenium-java
Bselenium-server
Cselenium-chrome-driver
Dselenium-api
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'selenium-server' which is for the Selenium server, not the client library.
Using driver-specific artifactIds instead of the main selenium-java.
3fill in blank
hard

Fix the error in the Maven <properties> section to set the Java version correctly.

Selenium Java
<properties>
  <maven.compiler.source>[1]</maven.compiler.source>
  <maven.compiler.target>17</maven.compiler.target>
</properties>
Drag options to blanks, or click blank then click option'
A1.8
B17
C11
Dlatest
Attempts:
3 left
💡 Hint
Common Mistakes
Setting source to '1.8' while target is '17' causes compilation errors.
Using 'latest' is not a valid version string.
4fill in blank
hard

Fill both blanks to complete the Maven <build> section with the Surefire plugin for running tests.

Selenium Java
<build>
  <plugins>
    <plugin>
      <groupId>[1]</groupId>
      <artifactId>[2]</artifactId>
      <version>3.0.0</version>
    </plugin>
  </plugins>
</build>
Drag options to blanks, or click blank then click option'
Aorg.apache.maven.plugins
Borg.seleniumhq.selenium
Cmaven-surefire-plugin
Dselenium-java
Attempts:
3 left
💡 Hint
Common Mistakes
Using Selenium groupId or artifactId instead of Maven plugin identifiers.
Omitting the plugin version or using incorrect plugin names.
5fill in blank
hard

Fill all three blanks to create a Maven profile named 'chrome' that sets a system property for ChromeDriver path.

Selenium Java
<profiles>
  <profile>
    <id>[1]</id>
    <properties>
      <chrome.driver.path>[2]</chrome.driver.path>
    </properties>
    <activation>
      <activeByDefault>[3]</activeByDefault>
    </activation>
  </profile>
</profiles>
Drag options to blanks, or click blank then click option'
Achrome
B/usr/local/bin/chromedriver
Cfalse
Dtrue
Attempts:
3 left
💡 Hint
Common Mistakes
Setting activeByDefault to true activates the profile always.
Using incorrect or relative paths for the ChromeDriver.