Selenium + mocha로 URL을 여는 데 문제가 있습니다. 이것은 내가 사용하고있는 코드 라인입니다.Firefox에서 Selenium get (url) 문제가 발생했습니다.
return driver.get('http://localhost/ClickSuscribe/#/MisProductos')
각형 URL에는 몇 가지 문제가 있지만 해결책을 찾지 못했습니다.
오류는이 테스트 케이스입니다 Error: timeout of 40000ms exceeded. Ensure the done() callback is being called in this test.
입니다 :
it("Is visible", function() {
if(viable)
{
return driver.findElements(webdriver.By.id('activarMiSitio')).then(function(misProductos){
misProductos[0].getAttribute("class").then(function(webElement){
if(webElement==='ng-hide')
{
console.log('Element not found');
}
else{
console.log('Element exists');
}
}).then(function(){
driver.sleep(500);
//return driver.get('http://localhost/ClickSuscribe/#').catch(r => console.log(r));
return driver.get('http://localhost/ClickSuscribe/#/MisProductos').catch(r => console.log(r));
});/*.then(function(){
driver.sleep(2000);
return driver.getCurrentUrl();
}).then(function(currentUrl){
driver.sleep(1000);
console.log(currentUrl);
});*/
});
}
return console.log("No está loggeado");
});
PS :이 크롬과 IE에서 작업을 수행합니다. 셀렌에 앵커 또는 파운드 ('#')가있는 URL을 처리하는 문제가있는 것으로 보입니다.
은 메소드 또는 스크립트 실행을 가져 오는 데 문제가 있습니까? –
@MohamedELAYADI 잘 모르겠습니다 만 get 메소드를 사용하는 것이 가장 가능성이있는 것으로 보입니다. get 메소드가있을 때 약 1 분 동안 멈추어 다음 테스트를 계속하기 때문입니다. –