Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

use a better way of waiting for page to be loaded #12

Open
edrisranjbar opened this issue Aug 30, 2022 · 0 comments
Open

use a better way of waiting for page to be loaded #12

edrisranjbar opened this issue Aug 30, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@edrisranjbar
Copy link
Owner

currently we are using time.sleep() method to tell system to wait for X seconds and after that run the next line of code. but we need a proper way to tell system wait until page loaded.

Problem

we do not know exactly how much would it take to load up Aparat pages. so putting a large number as sleep value, would make the script totally inefficient.

Solution

there is a proper way to do such a thing. we can use WebDriverWait which exists in selenium.webdriver.support.ui and takes 2 argument, first one would be the driver, and the second one is timeout value.

@edrisranjbar edrisranjbar added enhancement New feature or request good first issue Good for newcomers labels Aug 30, 2022
@edrisranjbar edrisranjbar self-assigned this Aug 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant