browser.wait(500000, function(window){
return window.browser.assert.element('[href="/manage-listing/10875466/description"]');
}, done);
I'm trying to automatize some things in Airbnb, this where an apartment's description is changed.
The page starts with an empty space in the middle and all the rest is loaded with javascript. That href appears at the end of it.
When I use that code it sometimes times out (even with all that waiting time), other times it sends me to the wrong url, maybe because it's in the middle of a redirect or something, and other times it is actually in the right page but the page still hasn't loaded. What am I doing wrong?
Can someone explain me browser.wait in more detail, please? I can't find any good examples anywhere.
Thank you.