-- webtest fix(type was not writing anything inside tinymce as it does not work for...
authorRavish Nair <ravish.nair@webaccess.co.in>
Tue, 2 Apr 2013 11:14:19 +0000 (16:44 +0530)
committerRavish Nair <ravish.nair@webaccess.co.in>
Tue, 2 Apr 2013 11:14:19 +0000 (16:44 +0530)
tests/phpunit/CiviTest/CiviSeleniumTestCase.php

index 1146117e394a993a276dc1f8741f4260fcb31ce9..9caeec4d7777fac43fc6faa9a4141746acda41ef 100644 (file)
@@ -442,8 +442,8 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase {
       $this->runScript("CKEDITOR.instances['{$fieldName}'].setData('<p>{$text}</p>');");
     }
     elseif ($editor == 'TinyMCE') {
-      $this->selectFrame("xpath=//iframe[@id='{$fieldName}_ifr']");
-      $this->type("//html/body[@id='tinymce']", $text);
+      $this->waitForElementPresent("xpath=//iframe[@id='{$fieldName}_ifr']");
+      $this->runScript("tinyMCE.activeEditor.setContent('<p>{$text}</p>');");
     }
     else {
       $this->fail("Unknown editor value: $editor, failing (in CiviSeleniumTestCase::fillRichTextField ...");