From: Ravish Nair Date: Tue, 2 Apr 2013 11:14:19 +0000 (+0530) Subject: -- webtest fix(type was not writing anything inside tinymce as it does not work for... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f97d29d184a21702899e5240353c753a3aaad2ff;p=civicrm-core.git -- webtest fix(type was not writing anything inside tinymce as it does not work for tinymce 3.4.x+ versions as per some posts in stackoverflow.so, I applied the suggested fix.) --- diff --git a/tests/phpunit/CiviTest/CiviSeleniumTestCase.php b/tests/phpunit/CiviTest/CiviSeleniumTestCase.php index 1146117e39..9caeec4d77 100644 --- a/tests/phpunit/CiviTest/CiviSeleniumTestCase.php +++ b/tests/phpunit/CiviTest/CiviSeleniumTestCase.php @@ -442,8 +442,8 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { $this->runScript("CKEDITOR.instances['{$fieldName}'].setData('

{$text}

');"); } 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('

{$text}

');"); } else { $this->fail("Unknown editor value: $editor, failing (in CiviSeleniumTestCase::fillRichTextField ...");