swaaz / InstaBot

Instagram bot built using Python and Selenium
37 stars 13 forks source link

Suggestion for Using Waits and EC instead of sleep #19

Closed autumnlewjb closed 4 years ago

autumnlewjb commented 4 years ago

Greetings, I'm a Python and Selenium beginner and I can't let my eye off your code. It's neat and I've learnt plenty. However, I'm curious why did you implement sleep but not waits from Selenium with the help of _expectedconditions? I always thought that waits in Selenium may save more time as it checks the DOM or the webpage for the element. Is there any downside of using those? Please correct me if I'm wrong here as I'm still a novice to Selenium and automation. And I'm happy to make a pull request if you like to.

swaaz commented 4 years ago

@autumnlewjb sleep() is used statically and wait() is used to check DOM or web element to load and then perform the next operation. I would be really happy if you create a pull request as it is in the development stage.

swaaz commented 4 years ago

fixed #20