1

During automation testing, I am trying to select "Albanian" from language dropdown and trying to enter a company name generated using jFairy. Below is the code snippet i am using(which is in Java).

As shown in the image below.

Please check the attached.

Fairy plFairy = Fairy.create(Locale.forLanguageTag("sq_AL"));    
Company alcompany = plFairy.company();
System.out.println("Company Name : "+alcompany.getName());

Polish, French, Italy languages are working. But for Albanian, arabic etc i am getting the below error.

java.lang.IllegalArgumentException: File jfairy_.yml was not found on classpath
    at com.devskiller.jfairy.data.MapBasedDataMaster.readResources(MapBasedDataMaster.java:98)
    at com.devskiller.jfairy.Bootstrap.fillDefaultDataMaster(Bootstrap.java:59)
    at com.devskiller.jfairy.Bootstrap.access$100(Bootstrap.java:38)
    at com.devskiller.jfairy.Bootstrap$Builder.build(Bootstrap.java:225)
    at com.devskiller.jfairy.Bootstrap.create(Bootstrap.java:93)
    at com.devskiller.jfairy.Fairy.create(Fairy.java:58)
    at com.bofa.ivv.application.driver.tandem.cucumber.step_definitions.CreatePartyTest.generateNames(CreatePartyTest.java:26)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

Added below dependency

<dependency>
    <groupId>com.devskiller</groupId>
    <artifactId>jfairy</artifactId>
    <version>0.6.2</version>
</dependency> 
Fenio
  • 3,528
  • 1
  • 13
  • 27
Anjana S
  • 15
  • 4
  • version of jfairy ? and did you add dependency ? – Dhru 'soni Mar 13 '19 at 05:29
  • Yes i have added dependency. Updated my original post. Using version 0.6.2. – Anjana S Mar 13 '19 at 05:55
  • it seems either it is not taking language code `sq_AL` i have checked with `pt` and `pl` and its working fine for those for some invalid code it gives the same error – NarendraR Mar 13 '19 at 06:35
  • I tried the language codes in this site - https://www.science.co.il/language/Locale-codes.php nothing seems to work apart from few selected ones. – Anjana S Mar 13 '19 at 09:28

0 Answers0