File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Testing and the fly likes jWebuniits for diff. languages Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "jWebuniits for diff. languages" Watch "jWebuniits for diff. languages" New topic
Author

jWebuniits for diff. languages

Devender M Reddy
Greenhorn

Joined: Aug 21, 2001
Posts: 6
Hi All,

Does any one know how to use jWebunits for other languages like spanish,chinese or other than english?any ideas,suggesions would be greatly appreciated...

thanks in advance.

Dev
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
I don't understand how the language of the tested application should matter?
For jWebUnit, it's just text--the tool doesn't care what the text is saying.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Devender M Reddy
Greenhorn

Joined: Aug 21, 2001
Posts: 6
Hi Lesse, thanks for the response,here is the scenario,when i use english content working fine--->

case #1 for English

this.loginToCatWorldwideHomePage("UNITED KINGDOM","English","Products","Machines");
this.gotoFrame("content");
assertLinkPresentWithText("Articulated Trucks");

case #2 when i give Espa�ol instead of english getting the following error:link Espa�ol is available on that page....any idea??? appreciate your time...thanks.


this.loginToCatWorldwideHomePage("UNITED KINGDOM","Espa�ol","Products","Machines");
this.gotoFrame("content");
assertLinkPresentWithText("Articulated Trucks");

java.lang.RuntimeException: No Link found for "Espa�ol" with label "UNITED STATES"
at net.sourceforge.jwebunit.HttpUnitDialog.clickLinkWithTextAfterText(HttpUnitDialog.java:694)
at net.sourceforge.jwebunit.WebTester.clickLinkWithTextAfterText(WebTester.java:905)
at net.sourceforge.jwebunit.WebTestCase.clickLinkWithTextAfterText(WebTestCase.java:367)
at cat.dcs.util.BaseTest.loginToCatWorldwideHomePage(BaseTest.java:100)
at cat.dcs.cmms.hypertests.MultiLangFamilySelector.testEng_US_WorkTools(MultiLangFamilySelector.java:21)
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:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:436)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:311)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30752
    
156

Devender,
Where is getting "UNITED STATES" from? The example says "UNITED KINGDOM".


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Does the test work if you select a language that doesn't have special characters like "�" in its name?
Devender M Reddy
Greenhorn

Joined: Aug 21, 2001
Posts: 6
Lesse,
yes,test is working fine for any as long as the language contains english alphabets..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jWebuniits for diff. languages