Implementing one custom Keyword into another custom Keyword

I had a Custom Keyword 1

=============================

package commonMethod

public class menuNavigation {
@Keyword
def selectRequiredMenuItem(String menuName){
WebDriver driver = DriverFactory.getWebDriver()

…}

}

I tried to implement in Custom Keyword 1 in

Custom Keyword 2

===================

package commonMethod

public class CustomSettings {

@Keyword
def commonFunctions(String action,String countryName){
WebDriver driver = DriverFactory.getWebDriver()

// “commonMethod.menuNavigation.selectRequiredMenuItem”(String menuName)
(new commonMethod.menuNavigation()).selectRequiredMenuItem(menuName)

Getting Error in parameters ie…menuName

Can you help me guiding this please

hello,
my first guess - do you have variable menuName defined somewhere in Keyword 2?
and/or can you share full error text?

Test passed , I didn’t get any error , unable to pass the parameter (menuName) values in Custom Keyword 2

ie when i use (new commonMethod.menuNavigation()).selectRequiredMenuItem(menuName)
or (new commonMethod.menuNavigation()).selectRequiredMenuItem()

Test case is getting passed but values are not entered

if you just have those lines… what is the value of menuName? It’s not defined within this method or passed as parameter.

hi,

why not use classes into test case?