I am trying to call method from one custom keywords to another Custom keywords functions

But I am getting below error,

05-30-2018 02:59:02 PM - [START] - Start action : mandatoryfield_Validation.Mandatoryfieldvalidation.textfieldvalidation 05-30-2018 02:59:02 PM - [INFO] - Finding Test Object with id 'Object Repository/HelpDeskModule/Master/Team/Page_eFACiLiTY/input_Txt_Code' 05-30-2018 02:59:02 PM - [ERROR] - No such property: CustomKeywords for class: mandatoryfield_Validation.Mandatoryfieldvalidation 05-30-2018 02:59:02 PM - [END] - End action : mandatoryfield_Validation.Mandatoryfieldvalidation.textfieldvalidation 05-30-2018 02:59:02 PM - [ERROR] - Test Cases/HelpDeskModule/Master/Team_/Team FAILED because (of) Variable 'CustomKeywords' is not defined for test case.

public class Mandatoryfieldvalidation {
//<!--Initializing object-->

private static Connection connection = null;
private static  String columntype;
private static int num;
private static int datatypevalue
def driver = DF.getWebDriver()
KeywordLogger logger = new KeywordLogger()
JavascriptExecutor js = ((driver) as JavascriptExecutor)

    //Method for validating textfield
    def void textfieldvalidation()

2 Answers 2


instead of CustomKeywords.'alerthandling.verifyalertpresent.verifyalert'()

use (new alerthandling.verifyalertpresent()).verifyalert()


It is possible, but you need to import corresponding packages. By the looks of it, you should try this:

import alerthandling.verifyalertpresent

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.