Hi @leishman_keith,
Using a ClickUsingJava keyword or WebUI.enhancedClick(findTestObject('yourObject')) might work you…
You can try using WebUI.enhancedClick(findTestObject('yourObject')) or the following:
First create a custom keyword as follows:
package tools
import org.openqa.selenium.WebDriver as WebDriver
import org.openqa.selenium.WebElement as WebElement
import org.openqa.selenium.interactions.Actions as Actions
import com.kms.katalon.core.annotation.Keyword as Keyword
import com.kms.katalon.core.testobject.TestObject as TestObject
import org.openqa.selenium.JavascriptExecutor as JavascriptExecutor
import com.kms.katalon.core.webui.common.WebUiCommonHelper as WebUiCommonHelper
import com.kms.katalon.core.webui.driver.DriverFactory as DriverFactory
public class ClickUsingJava {
@Keyword
def clickUsingJS(TestObject to, int timeout)
{
WebDriver driver = DriverFactory.getWebDriver()
WebElement element = WebUiCommonHelper.findWebElement(to, timeout)
JavascriptExecutor executor = ((driver) as JavascriptExecutor)
executor.executeScript('arguments[0].click()', element)
}
}
Next call the keyword in your test case:
CustomKeywords.'tools.ClickUsingJava.clickUsingJS'(findTestObject('yourObject'), 30)