Unable to Click on Shadow dom elements Salesforce application

Hi Russ & kazurayam , Thanks for your time and looking into the issue. The issue is resolved now using js path.

WebUI.switchToFrame(findTestObject('Object Repository/Page_Quote Salesforce/shadow_DomIframe'), 15, FailureHandling.STOP_ON_FAILURE)

WebUI.delay(10)

//SaveAndCalculate

def SaveAndCalculate = '''
document.querySelector("#sbPageContainer")
    .shadowRoot.querySelector("#content > sb-line-editor")
        .shadowRoot.querySelector("#actions > sb-custom-action:nth-child(7)")
            .shadowRoot.querySelector("#mainButton")
'''

CustomKeywords.'web.ShadowDom.clickDomElement'(SaveAndCalculate)
package web
import ...
class ShadowDom {

    @Keyword
    def clickDomElement(String JSPath) throws StepFailedException {
	    WebDriver driver = DriverFactory.getWebDriver();
	    JavascriptExecutor jsExecutor = ((JavascriptExecutor) driver)

	    WebElement elementLocator = ((jsExecutor.executeScript("return " + JSPath) as WebElement))

	    if (elementLocator.isDisplayed() && elementLocator.isEnabled()) {
		    WebUI.delay(3)
		    elementLocator.click()
		    KeywordUtil.markPassed("---> Element is clicked successfully")
	    }
	    else {
		    KeywordUtil.markFailedAndStop("---> Element is not clicked successfully")
	    }
    }
}

Thanks!