웹 사이트로 이동하고 키를 보내기 위해 selenium webdriver를 사용하고 있습니다. 개발 환경/컴퓨터에서 정상적으로 작동합니다. 하지만 나는 다른 컴퓨터를 통해 실행하려고 할 때 오류가 발생합니다.처리되지 않은 예외 : system.typeInitializationException
namespace McaidWebToolImport
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Enter the batch number: ");
string batchnumber = Console.ReadLine();
if (batchnumber != "")
{
IWebDriver driver1 = new InternetExplorerDriver(@"C:\IEDriverServer\");
driver1.Navigate().GoToUrl("http://website.com/webtool/physPop.asp?b=" + batchnumber);
System.Threading.Thread.Sleep(2000);
driver1.Quit();
}
else
{
Console.WriteLine("Re-run the application with valid batch number");
Console.WriteLine("\n\nPress Esacpe key (Esc) to exit");
while (Console.ReadKey(true).Key != ConsoleKey.Escape);
}
}
}
}
코드를 게시하십시오. – ryadavilli
[TypeInitializationException] (http://msdn.microsoft.com/en-us/library/system.typeinitializationexception.aspx)에 대해 살펴 보았습니까 ?? –
@ ryadavilli : 여기에 샘플 코드를 게시했습니다 ... – user1661116