1

I have a Maven Selenium WebDriver project in IntelliJ IDEA 14.0.2. My pom.xml file is as below:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>MasteringSeleniumTestingTools</groupId>
    <artifactId>Chapter3</artifactId>
    <version>1.0-SNAPSHOT</version>
    <dependencies>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>2.45.0</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>

When I ran the project as test command some warnings were shown as below:

[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!<br>
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
Ripon Al Wasim
  • 36,924
  • 42
  • 155
  • 176
  • Due to the encoding problem my assertion was failed at line assertEquals("Selenium WebDriver — Selenium Documentation", driver.getTitle()); Because actual title was print as "Selenium WebDriver � Selenium Documentation" instead of "Selenium WebDriver — Selenium Documentation" – Ripon Al Wasim May 15 '15 at 11:47

1 Answers1

1

https://maven.apache.org/general.html#encoding-warning

<project>
  ...
  <properties>
         <project.build.sourceEncoding>UTF8</project.build.sourceEncoding>
  </properties>

...

UTF-8 is also valid.

Dave Newton
  • 158,873
  • 26
  • 254
  • 302