2013-02-19 3 views
0

내가 watin와 협력 및 URL을 열려고하지만 때라도 예외 얻고 있어요 안녕하세요 : (열린 우리당 URI를 WatiN.Core.IE.CreateNewIEAndGoToUri에서탐색 브라우저 고토

을 IDialogHandler logonDialogHan의 dler, 부울 createInNewProcess) WatiN.Core.IE..ctor() WatinTesting.Program.Main (String [] args) c : \ users \ admin \ documents \ visua l studio 2010 \ Projects \ WatinTesting \ WatinTesting \ Program에 있습니다. cs : 줄 20

코드 이전 작업 g 괜찮아. 오해는 무슨 일이 일어나고 있는지 알려 주시기 바랍니다 :

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); 
      } 
     } 
    } 
} 

답변

0

추가하십시오 :

C# 코드는 다음과 같다 브라우저 : 경우에 제가 같은 사용 유형에 사용할 수있는 대체 코드를 알려 주시기 바랍니다 watin 버전과 같은 누락 된 데이터 및 만든 브라우저 인스턴스 (IE 인스턴스)입니다.

어쩌면이이 매개 변수를 사용하여 IE 인스턴스를 만들려고 도움이 될 것입니다

IE ie = new IE("http://www.google.com", true); //first param is url and the second is new process