Hi @Russ_Thomas I am using the following Custom Keyword that works fine, but how would I use Outline Property instead? Not sure of what syntax should be used, so far no luck in what I have tried.
package com.reusableComponents
import org.openqa.selenium.JavascriptExecutor
import org.openqa.selenium.WebDriver
import org.openqa.selenium.WebElement
import org.testng.Assert
import com.kms.katalon.core.annotation.Keyword
import com.kms.katalon.core.testobject.TestObject
import com.kms.katalon.core.webui.common.WebUiCommonHelper
import com.kms.katalon.core.webui.driver.DriverFactory
/**Used for highlighting page elements **/
public class HighlightElement {
static WebDriver driver = DriverFactory.getWebDriver()
@Keyword
public static void HighlightObject(TestObject objectto) {
try {
WebElement element = WebUiCommonHelper.findWebElement(objectto, 20);
for (int i = 0; i < 5; i++) {
JavascriptExecutor js = (JavascriptExecutor) driver;
js.executeScript("arguments[0].setAttribute('style','background: yellow; border: 2px solid green;');", element);
}
} catch (Exception e) {
Assert.fail(e.getMessage());
}
}
}