title: How to get and set text editor value in selenium
body: <p>I have text Editor on a web page, i need to fill its value using selenium scripting in c#. I know how to do it for textbox. i have checked the process from <a href="https://stackoverflow.com/questions/10557196/using-selenium-webdriver-in-c-how-do-i-select-a-text-box-to-write-in-then-wri">Set value in textbox</a> but when i have tried the same process for text editor, it is not working, i want to get and set the value of editor. please help me how can i do this.</p>
  
  <p>code for getting text of textbox is :</p>
  
  <pre><code>IWebDriver firefoxDriver = new FirefoxDriver();
  IWebElement passwordTextBox = Driver.FindElement(By.Id("passwordTextBox"));
  passwordTextBox.Clear();
  passwordTextBox.SendKeys("password");
  </code></pre>
  
  <p>I have tried the below code to set value of editor</p>
  
  <pre><code>IWebElement detailFrame = driver.FindElement(By.CssSelector("#cke_1_contents .cke_wysiwyg_frame"));
  driver.SwitchTo().Frame(detailFrame);
  Thread.Sleep(1000);
  var body = driver.FindElement(By.TagName("body")); // then you find the body
  Thread.Sleep(1000);
  body.SendKeys("&lt;span&gt;hiiiiiiii&lt;span&gt;");
  </code></pre>