I am trying to create a custom method/Keyword to wait for frame and element inside the frame. In eclipse I am able to create the custom method but in Katalon, @Override is not being recognized.
Need help here !
My code below:
public class ElementClickInFrame
{
static WebDriver driver= new ChromeDriver();
WebDriverWait wait= new WebDriverWait(driver, 60);
public static ExpectedCondition<WebElement> clickElementInFrame(final By locatorFrame, final By locator)
{
return new ExpectedCondition<WebElement>() {
@Override
public WebElement apply(WebDriver driver) {
try
{
driver.switchTo().defaultContent();
driver.switchTo().frame(driver.findElement(locatorFrame));
WebElement elem = driver.findElement(locator);
return elem.isDisplayed() && elem.isEnabled() ? elem : null;
}
catch(Exception e)
{
return null;
}
}
@Override
public String toString()
{
return "element located by: " + locator + " in " + locatorFrame;
}
};
}
}
In katalon the snapshot of error;

