I have a problem with the assembly of the project:
D:...\Main.java:112: error: unmappable character (0x98) for encoding windows-1251
robot.getBrowserControl().findElement(By.xpath("//div[.='НАПИСАТЬ']")).click();
This error in line:
robot.getBrowserControl().findElement(By.xpath("//div[.='НАПИСАТЬ']")).click();
Images: error, IDEA settings . Ths bottom-right is selected UTF-8. I'm not sure, but maybe it's like the symbol "И"
img errors
This my gradle file
plugins {
id 'java'
}
group 'ru.grbi3yh.processthesefiles'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
jar {
baseName = 'ProcessthFiles'
}
apply plugin: 'application'
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
compile group: 'org.seleniumhq.selenium', name: 'selenium-java', version: '2.41.0'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.7'
}
Setting encoding option for Java compilation should help:
compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'
As an alternative way to solve this error:
"error: unmappable character (0x98) for encoding windows-1251"
you can also change the default encoding inside Custom VM Options...
:
by adding, e.g.:
-Dfile.encoding=UTF-8
Help | Edit Custom VM Options, then restart IntelliJ IDEA.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With