Encodig Problem for Japanese Text

27 views
Skip to first unread message

Rahman Mahbub

unread,
May 30, 2016, 7:00:23 AM5/30/16
to Geb User Mailing List
I am checking the title of a japanese website like below:

class LoginPage extends Page {
static at = { title == "ログイン | 総合旅行サイト DeNAトラベル" }
static content = {
username(wait:true) { $(By.xpath('//input[@name="mailAddress"]'))}
password(wait:true) { $(By.xpath('//input[@name="password"]'))}
}
}

but when I execute this, I get the follwoing error :

Caught: geb.waiting.WaitTimeoutException: condition did not pass in 20.0 seconds. Failed with exception:
Assertion failed: 

title == "繝ュ繧ー繧、繝ウ ?ス? 邱丞粋譌?陦後し繧、繝? DeNA繝医Λ繝吶Ν"
|     |
|     false
ログイン | 総合旅行サイト DeNAトラベル

geb.waiting.WaitTimeoutException: condition did not pass in 20.0 seconds. Failed with exception:
Assertion failed: 

title == "繝ュ繧ー繧、繝ウ ?ス? 邱丞粋譌?陦後し繧、繝? DeNA繝医Λ繝吶Ν"
|     |
|     false
ログイン | 総合旅行サイト DeNAトラベル

at geb.waiting.Wait.waitFor(Wait.groovy:138)
at geb.waiting.Wait$waitFor.call(Unknown Source)
at geb.Page.verifyThisPageAtOnly(Page.groovy:226)
at geb.Page.verifyAt(Page.groovy:182)
at geb.Page$verifyAt$5.call(Unknown Source)
at geb.Browser.doAt(Browser.groovy:454)
at geb.Browser.at(Browser.groovy:336)
at Dena.HomePageLogin$_run_closure1.doCall(HomePageLogin.groovy:17)
at Dena.HomePageLogin$_run_closure1.doCall(HomePageLogin.groovy)
at geb.Browser.drive(Browser.groovy:1061)
at geb.Browser$drive$0.callStatic(Unknown Source)
at geb.Browser.drive(Browser.groovy:1031)
at geb.Browser$drive.call(Unknown Source)
at Dena.HomePageLogin.run(HomePageLogin.groovy:10)
Caused by: Assertion failed: 

title == "繝ュ繧ー繧、繝ウ ?ス? 邱丞粋譌?陦後し繧、繝? DeNA繝医Λ繝吶Ν"
|     |
|     false
ログイン | 総合旅行サイト DeNAトラベル

at Dena.LoginPage$__clinit__closure1.doCall(HomePageLogin.groovy:36)
at Dena.LoginPage$__clinit__closure1.doCall(HomePageLogin.groovy)
at geb.waiting.Wait.waitFor(Wait.groovy:127)
... 13 more


It is clear that, the title is not read properly.
How I can solve this problem?

Marcin Erdmann

unread,
May 31, 2016, 6:10:50 PM5/31/16
to Geb User Mailing List
This is not really a Geb question but a Java encoding question, to be honest. 

Are your source files encoded in utf-8? Are you compiling them with the compiler configured to use utf-8 encoding when reading source files?

--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/ff27d853-13a3-45d3-b65d-ede3a8b1be22%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages