Answered

Issue with clicking on CKEditor elements

We have a user that is having issues clicking on CKEditor elements that are labeled 'Enable SCAYT' and Disable SCAYT', the Clikc and Execute Javascript 'arguments[0].click();' are not able to find the elements.

Please see screenshots of the elements below, as well as the HTML and xpaths that were used, please let us know if we need to schedule a session for this, thanks.

HTML - 

<a id="cke_47" class="cke_button cke_button__scayt cke_button_expandable cke_button_on" href="javascript:void('Spell Check As You Type')" title="Spell Check As You Type" tabindex="-1" hidefocus="true" role="button" aria-labelledby="cke_47_label" aria-describedby="cke_47_description" aria-haspopup="menu" aria-disabled="false" aria-expanded="false" onkeydown="return CKEDITOR.tools.callFunction(76,event);" onfocus="return CKEDITOR.tools.callFunction(77,event);" onclick="CKEDITOR.tools.callFunction(78,this);return false;"><span class="cke_button_icon cke_button__scayt_icon" style="background-image:url('https://apps.test.era.nih.gov/eracdn/public/ckeditor/4.21.0/1.0/plugins/icons.png?t=N2M9');background-position:0 -1896px;background-size:auto;">&nbsp;</span><span id="cke_47_label" class="cke_button_label cke_button__scayt_label" aria-hidden="false">Spell Check As You Type</span><span id="cke_47_description" class="cke_button_label" aria-hidden="false"></span><span class="cke_button_arrow"></span></a>

XPaths - 

//a[@id='cke_47']/span[@class='cke_button_icon cke_button__scayt_icon']

//a[@id='cke_47'][contains(@class,'cke_button cke_button__scayt cke_button_expandable cke_button_off')]

 

0
2 comments
Avatar
Joseph Hamdan

Hi Abayomi,

1. Which error message do you see when you execute these steps? If any

2. Did you try using Multi_Action click?

3. Is there a publicly accessible website with such an editor that we can look at?

Regards,
Subject7 Team

0
Comment actions Permalink
Avatar
Joseph Hamdan

Hi Stephen,

Apologies for the delay in response. We found a sample CKEditor site publicly available and we tested using it. The key here is that the Enable SCAYT and Disable SCAYT links are located in a frame while the main ABC link is not in a frame.

By going to Advanced View, can you paste the below snippet and try:

WEB GOTO_URL "https://nightly.ckeditor.com/23-08-15-06-03/full/samples/" HALT ON ERROR 
WEB CLICK TARGET ELEMENT XPATH "//a[@class='cke_button cke_button__scayt cke_button_off cke_button_expandable']" ALIAS "" HALT ON ERROR 
WEB SWITCH FRAME BY XPATH "//iframe[@class='cke_panel_frame']" DURATION_TYPE WHOLE_TEST_CASE HALT ON ERROR 
WAIT 0 CAPTION "==========ENABLE SCAYT==========" HALT ON ERROR 
WEB CLICK TARGET ELEMENT XPATH "//a[@class='cke_menubutton cke_menubutton__scaytToggle cke_menubutton_off cke_menubutton__scaytToggle']" ALIAS "" HALT ON ERROR 
WAIT 0 CAPTION "==========DISABLE SCAYT==========" HALT ON ERROR 
WEB SWITCH FRAME BY MAIN DURATION_TYPE WHOLE_TEST_CASE HALT ON ERROR 
WEB CLICK TARGET ELEMENT XPATH "//a[@class='cke_button cke_button__scayt cke_button_expandable cke_button_on']" ALIAS "" HALT ON ERROR 
WEB SWITCH FRAME BY XPATH "//iframe[@class='cke_panel_frame']" DURATION_TYPE WHOLE_TEST_CASE HALT ON ERROR 
WEB CLICK TARGET ELEMENT XPATH "//a[@class='cke_menubutton cke_menubutton__scaytToggle cke_menubutton_off cke_menubutton__scaytToggle']" ALIAS "" HALT ON ERROR

Regards,
Subject7 Team

0
Comment actions Permalink

Please sign in to leave a comment.