Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
3.1k views
by
retagged by
Initially ck editor not display ,after selecting the question it display .not able to locate the CK editor element because it does not have a frame it also .Can any one help me ?
by Master (1.2k points)
Can you please brief what issue you are facing?

Provide code sample and error report.
by
moved by

Actually i tried to select the Description box and send the keys to the box .But for ck editor here there is no element id , so am not able to locate the element . i tried wit hswitch to frame() but not yet worked . so please suggest any other method .

----------------------------------------------------------------------------------------------------------------------------------------------------------------

Starting ChromeDriver 2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f) on port 36677

Only local connections are allowed.

Nov 22, 2017 6:10:56 PM org.openqa.selenium.remote.ProtocolHandshake createSession

INFO: Detected dialect: OSS

PASSED: login1

FAILED: reflectingbuttonselection

org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":"a[title='Rich Text Editor, editor7']"}

  (Session info: chrome=62.0.3202.94)

  (Driver info: chromedriver=2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f),platform=Windows NT 6.3.9600 x86_64) (WARNING: The server did not provide any stacktrace information)

Command duration or timeout: 10.04 seconds

For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html

Build info: version: 'unknown', revision: 'unknown', time: 'unknown'

System info: host: 'CON-DESKTOP01', ip: '192.168.2.31', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_121'

Driver info: org.openqa.selenium.chrome.ChromeDriver

Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f), userDataDir=C:\Users\CONDEV\AppData\Local\Temp\scoped_dir8932_17139}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=62.0.3202.94, platform=WIN8_1, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true, setWindowRect=true, unexpectedAlertBehaviour=}]

Session ID: 3362bef55d874e9846790a71ad1835fc

*** Element info: {Using=css selector, value=a[title='Rich Text Editor, editor7']}

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

at java.lang.reflect.Constructor.newInstance(Unknown Source)

at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:215)

at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:167)

at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:671)

at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:410)

at org.openqa.selenium.remote.RemoteWebDriver.findElementByCssSelector(RemoteWebDriver.java:501)

at org.openqa.selenium.By$ByCssSelector.findElement(By.java:430)

at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:402)

at issuelist.Issuelist.reflectingbuttonselection(Issuelist.java:43)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108)

at org.testng.internal.Invoker.invokeMethod(Invoker.java:661)

at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:869)

at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1193)

at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)

at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)

at org.testng.TestRunner.privateRun(TestRunner.java:744)

at org.testng.TestRunner.run(TestRunner.java:602)

at org.testng.SuiteRunner.runTest(SuiteRunner.java:380)

at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:375)

at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)

at org.testng.SuiteRunner.run(SuiteRunner.java:289)

at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)

at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)

at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)

at org.testng.TestNG.runSuitesLocally(TestNG.java:1226)

at org.testng.TestNG.runSuites(TestNG.java:1144)

at org.testng.TestNG.run(TestNG.java:1115)

at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:132)

at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:230)

at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:76)

===============================================

    Default test

    Tests run: 2, Failures: 1, Skips: 0

===============================================

===============================================

Default suite

Total tests run: 2, Failures: 1, Skips: 0

===============================================

1 Answer

0 like 0 dislike
by Master (1.2k points)

CK Editor is generated using JavaScript. So, for sure it has element inside the webpage.

Kindly analyze CKEditor using Chrome.

Currently I am answering this question using CKEditor and xPath for my CKEditor element is

//*[@id="cke_1_contents"]/iframe

Kindly inspect your CKEditor.

P.S.: Also, sometimes CKEditor takes time to load. Depending on your internet speed. So, make sure to use proper explicit wait commands.


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

1.4k questions

1.6k answers

866 comments

1.9k users

...