Hi, I'm investigating Window Tester pro for testing our project, but I
find two critical issues.
One is for inputting Japanese when replaying test codes recorded by
WT.
If I input Katakana, Hiragana or Kanji, the WT just skipped thoes
characters.
Even if I use the workaround listed here:
http://forums.instantiations.com/topic-5-3938.html
the recorded Japanse characters including kana and kanji just cannot
be inputted, what's more, after add the workaround, when replaying the
code within this workaround, eclipse (tested one) will crash .
Here is the workaround codes I used:
private void enterTextWithTempLocale(String s, String language,
String country)
{
Locale defaultLocale = Locale.getDefault(); // remember previous
Locale
Locale.setDefault(new Locale(language, country));
WT.setLocaleToCurrent();
ui.enterText(s); // enter the text in the ui
Locale.setDefault(defaultLocale); // reset to previous locale
WT.setLocaleToCurrent();
}
and if replaying codes like this:
enterTextWithTempLocale(
"C:\\alphabet\\ひらがな日本語漢字カタカナ\\myfile.text",
"ja", "JP");
a fatal error will happen, ending with a eclipse crashing:
com.windowtester.runtime.swt.internal.text.KeyMapTextEntryStrategy
$UnMappedKeyException: Key map not found for ひ for locale ja_JP
at
com.windowtester.runtime.swt.internal.operation.SWTKeyOperation.queueChar(SWTKeyOperation.java:
149)
at
com.windowtester.runtime.swt.internal.operation.SWTKeyOperation.keyString(SWTKeyOperation.java:
76)
at
com.windowtester.runtime.swt.internal.text.SWTOperationTextEntryStrategy.enterText(SWTOperationTextEntryStrategy.java:
15)
at
com.windowtester.runtime.swt.internal.UIContextSWT.enterText(UIContextSWT.java:
389)
at
com.curl.test.cde.utils.LocaleTools.enterTextWithTempLocale(LocaleTools.java:
38)
at
com.curl.test.cde.new_project.EclipsePrjName_SelectPrjLocation.testEclipsePrjName_SelectPrjLocation(EclipsePrjName_SelectPrjLocation.java:
510)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at com.windowtester.runtime.common.UITestCaseCommon.access
$0(UITestCaseCommon.java:1)
at com.windowtester.runtime.common.UITestCaseCommon
$2.run(UITestCaseCommon.java:130)
at com.windowtester.runtime.common.UITestCaseCommon
$3.run(UITestCaseCommon.java:151)
at com.windowtester.internal.runtime.junit.core.SequenceRunner
$1.run(SequenceRunner.java:40)
The other fatal issue for us is that even if the recorded codes have a
line like:
ui.enterText("C:\\temp\\files\\myfile.text");
what is inputted on the screen is
C*\temp\files\myfile.text
where the ":" is changed to "*".
I investigated some time for this strange issue, and found within
ASCII codes between 0x21 and 0x7E, 0x3A(":") will be replaced with
0x2A("*"), and 0x5E("^") will be replaced with 0x7E ("~") .
Did I missed anything ?
The following is the platform I found the above issues:
Windows7 SP1 Japanese (system locale is set to ja_JP)
Eclispse 3.6.2 (I tried booting eclispe with locale ja_JP and en_US,
the result are the same).
Test target is an eclipse plugin project.
Thanks in advance.
Deng