110,567
社区成员
发帖
与我相关
我的任务
分享
//获取父页面框架集合.
IHTMLFramesCollection2 frames = parentDocument.frames;
for (int i = 0; i < frames.length; i++)
{
object index = i;
IHTMLWindow2 frame = frames.item(ref index) as IHTMLWindow2;
IHTMLDocument2 frameDoc = frame.document as IHTMLDocument2
//现在你可以通过frameDoc获取子页面控件.
}
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using Shrinerain.AutoTester.Core;
using Shrinerain.AutoTester.HTMLUtility;
namespace attest
{
class Program
{
[STAThread]
static void Main(string[] args)
{
TestSession ts = new HTMLTestSession();
ts.Browser.Start("http://localhost:8080/mockup/event/page1.htm"); //这里替换为你页面1的url.
ts.Objects.TextBox("id=dvtext").Input("xxx");
}
}
}