This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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('\''))); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// <summary> | |
| /// Make sure our IsJavaScriptErrorPresent() and GetJavaScriptError() extensions can correctly intercept an error. | |
| /// </summary> | |
| [Test] | |
| public void ShouldFindOneErrorInBadScript() | |
| { | |
| selenium.Open("http://localhost"); | |
| selenium.RunScript("window.ThereBetterNotBeAFunctionByThisName();"); | |
| // The error should be: | |
| // window.ThereBetterNotBeAFunctionByThisName is not a function at http://localhost/ics/support/myhistory.asp line 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #undef UNIT_TESTS | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Reflection; | |
| using log4net; | |
| #if UNIT_TESTS | |
| using System.Text.RegularExpressions; | |
| using NUnit.Framework; | |
| #endif |