Python Selenium Tutorial #4 - ActionChains & Automating Cookie Clicker! - playegndary.com

Python Selenium Tutorial #4 – ActionChains & Automating Cookie Clicker!

Tech With Tim
Views: 121193
Like: 2460
In this selenium tutorial I discuss how to use selenium actionchains to automate the website cookie clicker. This will show you how to perform more advanced actions like drag and drop, long press, double click and much more.

Cookie Clicker Website:
Selenium Docs:

Playlist:

Subscribe to my second channel for weekly podcasts!

◾◾◾◾◾
💻 Enroll in The Fundamentals of Programming w/ Python

📸 Instagram:
🌎 Website
📱 Twitter:
⭐ Discord:
📝 LinkedIn:
📂 GitHub:
🔊 Podcast:

💵 One-Time Donations:
💰 Patreon:
◾◾◾◾◾◾

⚡ Please leave a LIKE and SUBSCRIBE for more content! ⚡

⭐ Tags ⭐
– Tech With Tim
– Python Tutorials
– Python Selenium Tutorial
– Selenium Tutorial Python
– ActionChains Selenium

⭐ Hashtags ⭐
#python #selenium

143 Comments

  1. Traceback (most recent call last):
    File "C:UsersheheehheAppDataLocalProgramsPythonPython39test.py", line 25, in <module>
    upgrade_actions = ActionsChains(driver)
    NameError: name 'ActionsChains' is not defined

    What is this?

  2. Hey man not sure if you read the comments but just from these 4 videos I automated checking a website if someone had cancelled their appointment and to text me if that appointment is sooner than the existing available date.

  3. I dont understand the str(i) for i in rage (1,-1,-1) can someone explain for a beginner? please? :/ and also is there someways to prevent selenium detection?

  4. bots are illeagle yall make all the bots you want lol might get account or ip banned tho

  5. that was pretty straight forward for you to say "For any of my tut, i simply go through the docs itself" ik you meant the brush up before every tut but still. Anyway I really liked your tuts -simple, easy and precise.

  6. Hey I love your tutorials , they are amazing broo , can you help me with how I click on jsname=U50xre

  7. Hey Tim, I'm struggling on how to automatically get rid of the cookie acceptance popups every time…how can we solve that with Selenium? Thx

  8. Hi, when you first mentioned automating a cookie clicker i tried to do it myself, faced a few problems but it worked in the end, but i did it using a while loop, but when i continued the video i saw that you did it using a for loop, is there a reason for that?

  9. should have chosen a different website………….
    i spent Way too much time on the cookie clicker game

  10. if you are having trouble with cookie_count.text line like me than use this:
    int(cookie_count.get_attribute('innerText').split()[0])

  11. Hey Tim – thanks for the great lesson.Learnt a new method which is helping me a lot. Here's a question for you : how do I close out a currently running instance of Actionchains and start a new instance of Actionchains? The reason I am asking this is I have a code whereby, the Actionchains running on current commands, are repeating themselves, everytime I run actionchains on a new command (e.g. it types out the username everytime I am using the current instance of Actionchains).
    I have found a workaround in which I am calling the perform() action right after all actionchains are executed – but I wanted to check anyway, if it is possible to have another solution, which involves a new instance, thus cancelling the earlier/current instance (I have also found another command which is reset, but that does not seem to work for me)

  12. amazon detected my bot and banned me fuck

  13. what's the difference between waiting with implicite wait or time.sleep() ? in both cases we won't pass that line until that duration we specified is over and the website is opened

  14. if in driver.get('link' ) , link is not working then how can we go on other link(web page)

  15. ITS IN THE MIDDLE OF THE NIGHT AND I WANT TO KNOW HOW TO CLICK "ACCEPT ALL COOKIES". WHY IS THIS GUY IMPLEMENTING A FUCKING COOKIE GAME CLICKING BOT!?

  16. Thanks for making me the best player at this game!

  17. I couldn't understand why we need to upgrade_actions.move_to_element ?

  18. Hi Tim, i just realized that using an opened browser from command line(using a .bat file) makes selenium much faster on low end computers like mine. i would like to share some videos later just like you

  19. I got a lot of errors and it does not work

  20. Just am in love with your style of teaching and materials!!! Amazing!!! Wow…!!!

  21. i got AttributeError(“move_to requires a WebElement”) AttributeError: move_to requires a WebElement error when i run this code. I could fix it with a lil help from stackoverflow but why you didnt get this error?

  22. you explain so well! and all the things you taught I can implement in my project which i find rare (me being a beginner), thanks a lot man. Respect.

  23. This doesn't work, whenever the cookie_count is over 23, it upgrades the cursor, and thus you can never reach 100.

  24. Damn. I wanted to use Selenium to automate a survey I have to fill out every morning before entering work. But your comment about being banned put me off, lol.

  25. "if we have a 100 cookies, I'd like to do grandma"

  26. How do other websites detect bots?
    How easily can other websites detect a bot?
    Just discovered your channel, BIG thumbs up!

  27. you don't need the sentence move_to_element, if you say directly upgrade_actions.click(item) it works just fine… And you have another mistake, when checking if the cookie_count value es greater than some upgrade, as it loops over the two items it buys the cheapest always and never gets to the most expensive, regardless the position in the list, but as you said, this tutorial was not about making a perfect cookie clicker script, it was to show us the functioning of the ActionChains, and that I must say you did indeed sir, great video

  28. You got error because it was 3,240 something and not 3240

  29. Thanks for the video, very helpful for a beginner like me. I'd like to ask, though, is there any chance for the clicks to be faster? Even my grandma can click faster than this (pun intended). I've been googling for a while and couldn't find anything helpful on the topic.

  30. this tutorial is hard to be applicable in other projects , not very useful

  31. selenium.common.exceptions.WebDriverException: Message: disconnected: received Inspector.detached event

    Looks like they have some security check in cookieclicker now

  32. did not work for me 🙁
    I did all the previous lessons and had success.
    this one did not go (not even the first part)

  33. Devansh: Machine Learning Made Simple says:

    Funny that Tim shows his hands off the mouse, but never his feet. He's definitely just using feet mouse

  34. I have a question, so as you said i may get IP banned. Can I use a proxy to avoid that?

    Also, let's say I live Europe and I wanna bot a website that's based in the US. Do I need to use a server to speed up the process, (with the proxy to change my ip) for example AWS or Google cloud or whatever? Or is the proxy sufficient?

  35. Hey, im trying this out and i want to make the price list become longer as more items are unlocked anybody got a hint for this

  36. Sitting through your Ads, cos you deserve it!!

  37. Bro pliss help when i run i got error cann't import name Action Chains

  38. I have problem that actions.perform() runs only once ( like in 8:58 )
    even if i do not use loop but write actions.perform() multiple times it only clicks once.
    Any ideas?

  39. Is the try block and implicitly_wait function the same? can we just alternate between them?

  40. Hopefully you will come back to this series one day :/

Leave a Reply

Your email address will not be published.