I'm having some issue opening going to an URL with Selenium + mocha. This is the line of code I'm using.
return driver.get('http://localhost/ClickSuscribe/#/MisProductos')
I've found that there are some issues with angular urls however I haven't found a solution.
The error is Error: timeout of 40000ms exceeded. Ensure the done() callback is being called in this test.
This is the test case:
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: this does work in Chrome and IE
Aucun commentaire:
Enregistrer un commentaire