Calendar Custom Keywords


This is a companion discussion topic for the original entry at https://store.katalon.com/product/25#qa-content
1 Like

How to use this keyword inside other keyword. I have installed the plugin and even i have imported in the Katalon studio.

1 Like

Hi @Abhishek_Kumar_Gupta, currently Katalon doesn’t support to using the CustomKeyword in other CustomKeyword. However, you can use my CustomKeyword as a Java class.

Please see the detail below:

  • Import my keyword as a class:
    import com.katalon.plugin.keyword.calendar.SetDateCalendarKeyword as SetDateCalendarKeyword
  • Using in your keyword
public class MyKeywords {
	@Keyword
	def doSomething(){
		
		SetDateCalendarKeyword Keyword = new SetDateCalendarKeyword();
		Keyword.setDate(findTestObject('YOUR_OBJECT'), 10, 5, 2019, 2000, FailureHandling.STOP_ON_FAILURE);
	}
}
1 Like

But it is failing as it is unable to set the date. Giving step fail exception.

1 Like

Could you please show me the console log? It will help me understand what’s happening.
And what Katalon version are you using?

1 Like

Version 6.1.1

1 Like

The keyword should work correctly on Katalon version 6.1.1
I’ll give you more information if I receive the console log.

Hi,

Please help…

2019-06-18 15:19:21.079 ERROR k.k.c.m.CustomKeywordDelegatingMetaClass - ? com.katalon.plugin.keyword.calendar.SetDateCalendarKeyword
2019-06-18 15:19:21.080 ERROR c.k.katalon.core.main.TestCaseExecutor - ? Test Cases/RMS/Routes/RouteLevel_CTM FAILED.
Reason:
java.lang.ClassNotFoundException: com.katalon.plugin.keyword.calendar.SetDateCalendarKeyword
at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.getCustomKeywordClassAndSetMetaClass(CustomKeywordDelegatingMetaClass.java:100)
at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.invokeStaticMethod(CustomKeywordDelegatingMetaClass.java:45)
at RouteLevel_CTM.run(RouteLevel_CTM:35)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:133)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:116)
at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:83)
at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1560842342146.run(TempTestSuite1560842342146.groovy:35)

Build step ‘Execute Katalon Studio Tests’ marked build as failure
Finished: FAILURE

Error from Katalon Analytics:

2019-06-18 08:49:08 - [TEST_CASE][ERROR] - Test Cases/RMS/Routes/RouteLevel_CTM: Test Cases/RMS/Routes/RouteLevel_CTM FAILED.
Reason:
java.lang.ClassNotFoundException: com.katalon.plugin.keyword.calendar.SetDateCalendarKeyword

at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.getCustomKeywordClassAndSetMetaClass(CustomKeywordDelegatingMetaClass.java:100)

at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.invokeStaticMethod(CustomKeywordDelegatingMetaClass.java:45)

at RouteLevel_CTM.run(RouteLevel_CTM:35)

at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)

at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)

at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)

at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)

at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)

at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)

at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)

at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:133)

at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:116)

at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:83)

at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)

at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)

at TempTestSuite1560847741888.run(TempTestSuite1560847741888.groovy:35)

how to use this keyword on mobile app?

I keep getting

com.kms.katalon.core.exception.StepFailedException: This calendar is not supported! (Root cause: com.kms.katalon.core.exception.StepFailedException: This calendar is not supported!
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain$stepFailed$0.call(Unknown Source)
at com.katalon.plugin.keyword.calendar.SetDateCalendarKeyword$_setDate_closure1.doCall(SetDateCalendarKeyword.groovy:67)
at com.katalon.plugin.keyword.calendar.SetDateCalendarKeyword$_setDate_closure1.doCall(SetDateCalendarKeyword.groovy)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain$runKeyword.call(Unknown Source)
at com.katalon.plugin.keyword.calendar.SetDateCalendarKeyword.setDate(SetDateCalendarKeyword.groovy:37)
at com.katalon.plugin.keyword.calendar.SetDateCalendarKeyword.invokeMethod(SetDateCalendarKeyword.groovy)
at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.invokeStaticMethod(CustomKeywordDelegatingMetaClass.java:50)
at Calendar Plugin Test case example.run(Calendar Plugin Test case example:37)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:105)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1564998338979.run(TempTestCase1564998338979.groovy:21)
)

me too.
2019-10-09 16:23:10.501 ERROR c.k.k.core.keyword.internal.KeywordMain - :x: This calendar is not supported! (Root cause: com.kms.katalon.core.exception.StepFailedException: This calendar is not supported!
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain$stepFailed$0.call(Unknown Source)
at com.katalon.plugin.keyword.calendar.SetDateCalendarKeyword$_setDate_closure1.doCall(SetDateCalendarKeyword.groovy:67)
at com.katalon.plugin.keyword.calendar.SetDateCalendarKeyword$_setDate_closure1.doCall(SetDateCalendarKeyword.groovy)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain$runKeyword.call(Unknown Source)
at com.katalon.plugin.keyword.calendar.SetDateCalendarKeyword.setDate(SetDateCalendarKeyword.groovy:37)
at com.katalon.plugin.keyword.calendar.SetDateCalendarKeyword.invokeMethod(SetDateCalendarKeyword.groovy)
at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.invokeStaticMethod(CustomKeywordDelegatingMetaClass.java:50)
at RequestContainer.run(RequestContainer:32)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:133)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:116)
at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:83)
at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1570609369596.run(TempTestSuite1570609369596.groovy:35)
)