0

I'm trying to write in a text editor using selenium however when i ran the test is not founding the rich text box, this is HTML code:

<document>
<html lang="en" dir="ltr">
<head>
<body class="cke_editable cke_editable_themed cke_contents_ltr" contenteditable="true" spellcheck="false" title="This is a rich text editor control.">
<p>
<br/>
</p>
</body>
</html>
</document>

And this what i got so far from Java code on Eclipse

  WebElement frame = driver.findElement(By.xpath(".//*[@title='This is a rich text editor control.']/p/br"));
            driver.switchTo().frame(frame);
            WebElement body = driver.findElement(By.tagName("body"));
            body.sendKeys("Hello world");
            driver.switchTo().defaultContent();

Any ideas on here? is not an iFrame so i'm not even sure if switchto command is needed

Rive
  • 1
  • 4
  • Possible duplicate of [Selenium and wordpress: New post test](http://stackoverflow.com/questions/23999777/selenium-and-wordpress-new-post-test) – SiKing Oct 30 '15 at 20:35
  • Your HTML doesn't show the rich text box... or the iframe referenced in code. Please clean up the question to make it more clear what you are asking. – JeffC Oct 31 '15 at 13:54

0 Answers0