Cucumber Click Fails but Script passes?

Hi Experts
I am working with Gherkin Scripts and have issues with Submit button does not work but this works(Pass) when I run using Test case

WebUI.sendKeys(findTestObject(‘Object Repository/TestProject/Page_Login Salesforce/input_Password_pw’), Keys.chord(Keys.ENTER))

groovy.lang.MissingPropertyException: No such property: Keys for class: testauthentication
at testauthentication.clicksubmit(testauthentication.groovy:69)
at ✽.I click login(C:/Data/Automation/Katalon Studio/TestProject/TestProjects/Include/features/TestFeatures/Authentication.feature:27)

@And(“I click login”)
def clicksubmit() {

  WebUI.sendKeys(findTestObject('Object Repository/TestProject/Page_Login  Salesforce/input_Password_pw'), Keys.chord(Keys.ENTER))
}
  1. Is there a way i can directly enter manually like this: WebUI.Click(By.Xpath("…IDLocator")
    in test cases ?

Problem 1: Solved, import org.openqa.selenium.Keys as Keys added to the Cucumber Script

Question 2: Xpath, Execute xpath functions from Katalon Studio I found this link, any other good references

1 Like