110,533
社区成员
发帖
与我相关
我的任务
分享
Thread th;
string sssss;
private void btnAdd_Click(object sender, EventArgs e)
{
th=new Thread(tmp);
sssss = this.Text;
th.Start();
}
private void tmp()
{
try
{
Thread.Sleep(3000);
MessageBox.Show("Clicking");
HTMLTestSession test = new HTMLTestSession();
test.Browser.Find(sssss);
test.Objects.Dialog().WinObjects.Button("确定").Click();
MessageBox.Show("Clicked");
}
catch
{
}
}
private void btnEdit_Click(object sender, EventArgs e)
{
th.Abort();
}