How to wait to load the element in browser
See original GitHub issuehi i created a common function to wait to load page but not working the code.
this.waitForElements=function(element){
for (var sec = 0;; sec++) {
if(sec>120){
break;
}
if(this.checkingElement(element)==true){
break;
}
browser.sleep(1000);
}
};
this.checkingElement=function(availableElement){
val=false;
availableElement.isPresent().then(function(){
val=true;
});
return val;
};
when i call ‘waitForElements(pageobject element)’ i am getting error while waiting for Protractor to sync with the page how to control this one. script was executing with out wait .
Thanks& Regards OmPrakash
Issue Analytics
- State:
- Created 9 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to wait for an element before proceeding
This wait is built into the APIs that Load Tester uses to interface with the browser (Selenium/WebDriver). After that API returns, the step...
Read more >How to get Selenium to wait for a page to load - BrowserStack
Wondering how to wait for a web page to load in Selenium testing? Read tutorial to understand 3 methods to execute the same....
Read more >How to wait for a page to load or element to be present when ...
describe('Search', function() { it('should click Search button and wait for results', function() { browser.driver.findElement(by.id('search')).click(); }); });.
Read more >How do I wait for the Browser to finish loading the page - Studio
The browser must know when the page is loading and when it's finished loading as it displays spinning circle wait indicator.
Read more >Use Selenium wait for page to load with Python [Tutorial]
Selenium wait in Python gives additional time for loading of the WebElements in the DOM. In this article, we deep dive into the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the detailed answer, @elgalu
Please post questions like this on Stack Overflow so that we can keep the issue tracker clean for bugs and feature requests. Thanks!
But here it will wait until the wait time expires, i think it is not a good way. Any other way to wait for the locator upto the presence or availability of that ?