我一直在使用watin进行webapp的集成测试。 webapp使用fckeditor作为richtext控件之一。FckEditor的Watin测试
这里是一片我的web应用程序的viewsource的HTML中,包括FCKeditor的
IFRAME ID = “ctl00_HeaderMain_txtSafetyNetDescription ___框架” SRC = “/ FCKEditor的/编辑/ fckeditor.html?实例名= ctl00_HeaderMain_txtSafetyNetDescription &工具栏= MyApp来” 宽=“100%”height =“200px”frameborder =“no”scrolling =“no”/ iframe
通过使用watin脚本...我能够使用下面的代码获取框架对象。
Frame frame = ie.Frame(Find.ById("ctl00_HeaderMain_txtSafetyNetDescription___Frame")) ;
现在我想写一些文本到fckeditor。但我不知道如何写入fckeditor,因为它是一个框架 - 有人可以帮助我做到这一点。
谢谢。 Iyyengar。
我必须这样做: var richTextFrame = browser.Frame(WatiN.Core.Find.ByTitle(“Rich text editor,DESCRLONG $ 0,press ALT 0 for help。”)); richTextFrame.Body.SetAttributeValue(“innerText”,“Testing Note Details”); – Omzig 2014-07-14 16:24:01