Python Selenium Tutorial #4 – ActionChains & Automating Cookie Clicker!
Tech With Tim
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:
💵 One-Time Donations:
⭐ Tags ⭐
⭐ Hashtags ⭐
Cookie Clicker Website:
Subscribe to my second channel for weekly podcasts!
💻 Enroll in The Fundamentals of Programming w/ Python
💵 One-Time Donations:
⚡ Please leave a LIKE and SUBSCRIBE for more content! ⚡
⭐ Tags ⭐
– Tech With Tim
– Python Tutorials
– Python Selenium Tutorial
– Selenium Tutorial Python
– ActionChains Selenium
⭐ Hashtags ⭐
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?
bro who promises
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.
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?
bots are illeagle yall make all the bots you want lol might get account or ip banned tho
Super! It's a kind of magic…
Is this script work when i will minimize chrome?
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.
Hey I love your tutorials , they are amazing broo , can you help me with how I click on jsname=U50xre
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
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?
should have chosen a different website………….
i spent Way too much time on the cookie clicker game
if you are having trouble with cookie_count.text line like me than use this:
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)
Tim, you're awesome!
amazon detected my bot and banned me fuck
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
if in driver.get('link' ) , link is not working then how can we go on other link(web page)
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!?
Thanks for making me the best player at this game!
I couldn't understand why we need to upgrade_actions.move_to_element ?
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
Thanks for the great vids.
I got a lot of errors and it does not work
"like to do Grandma!!!"
Just am in love with your style of teaching and materials!!! Amazing!!! Wow…!!!
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?
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.
This doesn't work, whenever the cookie_count is over 23, it upgrades the cursor, and thus you can never reach 100.
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.
"if we have a 100 cookies, I'd like to do grandma"
How do other websites detect bots?
How easily can other websites detect a bot?
Just discovered your channel, BIG thumbs up!
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
You got error because it was 3,240 something and not 3240
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.
this tutorial is hard to be applicable in other projects , not very useful
selenium.common.exceptions.WebDriverException: Message: disconnected: received Inspector.detached event
Looks like they have some security check in cookieclicker now
91.981 trillion cookies baby
did not work for me 🙁
I did all the previous lessons and had success.
this one did not go (not even the first part)
Funny that Tim shows his hands off the mouse, but never his feet. He's definitely just using feet mouse
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?
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
Sitting through your Ads, cos you deserve it!!
how can i make it click faster?
You are good, bro
Bro pliss help when i run i got error cann't import name Action Chains
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.
we can also do time.sleep
Is the try block and implicitly_wait function the same? can we just alternate between them?
Hopefully you will come back to this series one day :/