KatalonStudio : Unable to set the text on paragraph tag using SetText method

While Testing the Editor functionality we are unable to set the Text in editor, because setText method only use with tag not with

tag.Editor is using

tag for writing the text.
Any Best Solution to resolve this issue ?
Thanks in Advance !!

Question 1: Did you try the sendKeys?
Question 2: What is the error you’re getting with setText

Error Message : **

05-09-2018 05:53:26 PM - [FAILED] - Unable to set text ‘Report summary’ of object ‘Object Repository/SSD_OR/report_summary’ (Root cause: org.openqa.selenium.WebDriverException: unknown error: cannot focus element (Session info: chrome=66.0.3359.139)

(Driver info: chromedriver=2.35.528157 (4429ca2590d6988c0745c24c8858745aaaec01ef),platform=Mac OS X 10.12.6 x86_64) (WARNING: The server did not provide any stacktrace information)

Command duration or timeout: 0 milliseconds

Build info: version: ‘3.7.1’, revision: ‘8a0099a’, time: ‘2017-11-06T21:07:36.161Z’

System info: host: ‘MacBook-Pro.local’, ip: ‘’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.12.6’, java.version: ‘1.8.0_102’

Driver info: com.kms.katalon.selenium.driver.CChromeDriver

Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.35.528157 (4429ca2590d698…, userDataDir: /var/folders/6s/xqvn5rqj1mq…}, cssSelectorsEnabled: true, databaseEnabled: false, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: MAC, platformName: MAC, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 66.0.3359.139, webStorageEnabled: true}

Session ID: da38daf2521ba3a181321040a48cb0df)

05-09-2018 05:53:26 PM - [END] - End action : setText

**Script : **


WebUiBuiltInKeywords.setText(findTestObject(‘SSD_OR/report_summary’), ‘Report summary’)


Using sendkeys but still getting the same !!

I’m surprised to see there is not a Set Attribute method in the KS API.

Also, have you checked the

tag has contenteditable attribute set?

You’ll probably end up calling JavaScript to do this.

Nothing works for me. Any suggestions ??

Let me rephrase my previous answer/question…

If you are trying to place a

element into editing mode then it MUST have a contenteditable attribute. https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Editable_content

If your

element does NOT have that attribute, then nothing you try to do with regular testing APIs (e.g. WebUI) will make it work. Your only recourse is to do one of the following:

1 - change the HTML of the AUT at source.

2 - Use JavaScript to modify the AUT from your test.

#1 is cool.

#2 is not cool. Seriously BAD PRACTICE. Modifying the AUT from a test destroys the very meaning of a test.


Hey @Russ Thomas
Thanks for the suggestions and your time.Actually contenteditable**=“true”** attribute is not added with the tag.So should I add it dynamically ?

I would strongly advise you NOT to do that – see my previous message.

@Russ Thomas
Are you talking about this: **change the HTML of the AUT at source. ??