Skip to content

Instantly share code, notes, and snippets.

@RossPatterson
Created April 16, 2013 18:53
Show Gist options
  • Select an option

  • Save RossPatterson/5398534 to your computer and use it in GitHub Desktop.

Select an option

Save RossPatterson/5398534 to your computer and use it in GitHub Desktop.
public static void FillTinyMCE(P5Browser selenium, string editorId, string fillString)
{
string editorFrameId = editorId + "_ifr";
selenium.Focus(String.Format("dom=document.getElementById('{0}').contentWindow.document.body", editorFrameId));
selenium.GetEval(String.Format("selenium.browserbot.getCurrentWindow().document.getElementById('{0}').contentWindow.document.body.innerHTML = '{1}';",
editorFrameId, fillString.ToJsString('\'')));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment