I'm currently setting up an automation testing in Salesforce application but I am having a problem of typing characters in rich text editor using Selenium IDE.
As I know that the rich text editor is wrapped in the iframe. In the HTML, I got the code like this:
<iframe id="j_id0:j_id4:j_id6:j_id115:j_id117:textAreaDelegate_Comments__c_frame"
frameborder="0" allowtransparency="true" tabindex="0" src="" title="Rich text editor,
j_id0:j_id4:j_id6:j_id115:j_id117:textAreaDelegate_Comments__c, press ALT 0 for help."
style="width:100%;height:100%">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org
/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html class="CSS1Compat" lang="en" dir="ltr" style="background-color: transparent;">
<head>
<body id="j_id0:j_id4:j_id6:j_id115:j_id117:textAreaDelegate_Comments__c_rta_body"
class="cke_show_borders" contenteditable="true" spellcheck="false" style="background-
color: transparent;">
</html>
</iframe>
My current steps are:
- Command: selectFrame, Target:
xpath=//*[contains (@id, 'j_id0:j_id4:j_id6:j_id115:j_id117:textAreaDelegate_Comments__c_frame')] - Command: click, Target:
xpath=//*[contains (@id, 'j_id0:j_id4:j_id6:j_id115:j_id117:textAreaDelegate_Comments__c_rta_body')] - Command: focus, Target:
xpath=//*[contains (@id, 'j_id0:j_id4:j_id6:j_id115:j_id117:textAreaDelegate_Comments__c_rta_body')] - Command: sendKeys, Target:
xpath=//*[contains (@id, 'j_id0:j_id4:j_id6:j_id115:j_id117:textAreaDelegate_Comments__c_rta_body')],Value: Input Value in Rich Text Editor!!!
When I ran this test case, and I got the following error in step 4 - Unexpected Exception: Error: Cannot set the selection end. fileName -> chrome://selenium-ide/content/selenium-core/scripts/atoms.js, lineNumber -> 6118, columnNumber -> 6. I didn't know what did I do wrong and why I couldn't typing characters in rich text editor using Selenium IDE.
Thanks