2

나는 Protractor.Net을 사용 중이며 IE에는 이상한 문제가 있습니다. 나는 그 문제가 사이트 부트 스트랩과 관련이 있다고 생각하지만, 알아낼 정도로 지식이 없다고 생각한다. 그러나 동일한 코드가 ChromeFirefox에서 제대로 작동합니다.각도기 및 IE11 탐색 문제

동일한 페이지에서 두 가지 다른 테스트를 수행하고 있습니다. 내 신청서는 non-angularangualr 하이브리드입니다. Angular 페이지로 이동 한 후 첫 번째 테스트는 아무런 문제없이 실행됩니다. 테스트를 위해 다시 같은 url로 이동 필요가 나는 그것의 그렇게하려고 할 때 breaking.The 첨부 파일은 실제로 프로젝트에서 버그를 발견 Imgur Imgur Imgur Imgur

//Navigate and binds the page 

public TestPage TestPage() 
{ 
    string url = BaseUrl + "/n/Test/TestPage#/"; 

    //need to handle asyn script call timeout 
    Driver.Manage().Timeouts().SetScriptTimeout(TimeSpan.FromSeconds(10)); 

    NgWebDriver ngDriver = new NgWebDriver(Driver, "[ng-app='Test']"); 
    ngDriver.Navigate().GoToUrl(url); 

    return new TestPage(ngDriver); 
} 



// Resume Angular bootstrap this is in URL setter and fails here on second iteration 
this.jsExecutor.ExecuteScript(ClientSideScripts.ResumeAngularBootstrap, 
String.Join(",", this.mockModules.Select(m => m.Name).ToArray())); 
+0

글쎄, 난 downvote하지 않았다하지만 그 사람이했던 이유는 분명하다 : 코드 이미지로 추가 _never_한다 (같은 읽을 수없는, 복사 또는 인덱싱 할 수없는, 고해상도 링크는 죽어 갈 수도) . 당신의 대답에도 똑같이 적용됩니다. 모든 이미지를 실제 코드로 바꾸십시오. –

+0

@ MathiasMüller 제안대로 대체 됨 – Saifur

+1

upvote로 "Rewarded"! –

답변

1

로도 사용할 수 있습니다. URL 속성 설정 기에서 다음 행을 설정하면 문제가 해결됩니다!

this.driver.Url = "about:blank"; 

get 
{ 
    this.WaitForAngular(); 
    IHasCapabilities hcDriver = this.driver as IHasCapabilities; 
    if (hcDriver != null && hcDriver.Capabilities.BrowserName == "internet explorer") 
    { 
     // 'this.driver.Url' does not work on IE 
     //this.driver.Url = "about:blank"; //this is bug fix 
     return this.jsExecutor.ExecuteScript(ClientSideScripts.GetLocationAbsUrl, this.rootElement) as string; 
    } 
    else 
    { 
     return this.driver.Url; 
    } 
}