こんにちは、私は watin を使用しており、URL を開こうとしていますが、次の例外が発生しています。
WatiN.Core.IE.CreateNewIEAndGoToUri(Uri uri, IDialogHandler logonDialogHandler, Boolean createInNewProcess) で WatiN.Core.IE..ctor() で WatinTesting.Program.Main(String[] args) で c:\users\admin\ documents\visual studio 2010\Projects\WatinTesting\WatinTesting\Program.cs: 20 行目
以前のコードは正常に動作しました。何が問題なのか教えてください: 場合に備えて、同じタイプで使用できる代替コードを教えてください: ブラウザ
C# コードは次のとおりです。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WatiN.Core;
using WatiN.Core.Native.InternetExplorer;
using System.Threading;
namespace WatinTesting
{
class Program
{
[STAThread]
static void Main(string[] args)
{
try
{
IE browser = new IE();
browser.GoTo("http://google.com");
browser.TextField(Find.ByName("q")).TypeText("WatiN");
browser.Button(Find.ByValue("Google Search")).Click();
}
catch (Exception e)
{
Console.WriteLine(e.StackTrace);
Thread.Sleep(10000);
}
}
}
}