What makes me feel suspecious about the comments is that I hardly find anyone facing an issue, while if you're following the same steps you WILL definitely face issues with the code. But the comments section is full of angels
Every time I execute my code, Chrome shows the message that I need to select a browser to set as default, I already did that and made sure to re-do it just for the issue to remain, any solutions?
@28:50 If you want to go straight to the html element in inspection (here: the number of cookies), click on the arrow in the dotted square at the top left corner of the inspection window (it'll turn blue) and then click on the element on the webpage you want to find in the html. The inspection window will then take you straight to the html where the element is at. Having said that: great video!
Hopefully this helps someone, I was having issues around 28:24 and getting the following error: "Message: stale element reference: stale element not found". This seemed to be because the page would load after clicking the language? I added time.sleep(5) to the line before finding the cookie and it solved the error. I'm not sure why the WebDriverWait function wasn't working as intended though, I'm assuming it was finding the cookie after the language was pressed but due to the loading screen popping up, Selenium ended up losing the cookie and errored out?
Love your tutorials. I use xpath quite often when trying to find what to click on. In chrome, when you right click and inspect an element, it brings up the page source. Then if you right click the item that you are looking for, you can copy the xpath and paste it in your program as well.
Been trying to figure out this for the last 2 days and could only find outdated and irrelevant videos. This video was really what i needed and even more. Props to you bro!
You go way too fast for this 65-year-old brain, but I understand, a slower pace would be boring for young programmers. But for the first time, I have a handle about the concepts of web scraping. You are using the Selenium Python library to bot web surfing. Too cool!
@@Alien-by3gb It's a hobby of mine, ever since PCs hit the market. I remember when Apple IIs were the rage. I've been messing around with programming ever since.
I had same issue when testing Google, I suppose because of another window covering search bar. I switched to another browser like DuckDuckGo and code worked.
Btw i solved it myself, u search by xpath instead of class. You input the declines button xpath and then also a time.sleep(2) so the cookies have time to load properly
Just a question, instead of waiting for 5seconds for the elements to exist. Can you implement some kind of a loop to keep searching for the element until they do exist? Would this best be done with a while loop, and what would it look like?
Hi, Tim. Wouldn't be easier to use webdriver_manager library where it gets the last version of the driver to match the browser you have installed? because everytime you have a version upload you have to download it and retest this?
Fucking Great Video My Man, I have been getting errors everytime when i try to get the selenium working... after watching this video i solved my problem and its workingggg.
Hi there, I'm having a major issues with my paths, I've added the driver to the PATH, I've pinpointed it specifically using an exact path, and a local path...still, it doesn't find the chrome driver. Message: unknown error: cannot find Chrome binary Stacktrace: It's been plaguing me and stopping my progress on every tutorial....please help! Thanks!
Merci pour tes supers vidéos ! Voici un post à venir qui pourraient intéresser plusieurs abonnés et autres, c'est le fait de pouvoir trouver comment cliquer sur les choix de demandes de consentements comme sur le site Mappy, qui contient une masse d'infos de Pros et surtout leur email..., ais il y a des fenêtres qui sont bloquantes et difficiles à contourner ("Accepter & Fermer" + "Continuer sans accepter" + "Connexion" ...), merci pour ton écoute? Roby
It's a little disappointing knowing how difficult it is to avoid detection and all the extra steps you have to take. I have to login to our work website once a day to check some boxes, so I wanted to just automate that boring task and was excited about figuring it out, but now knowing I'll probably get blocked for being a bot really took the wind out of my sails lol great video tho. I'm sure I'll use this information... Somehow.
It doesn't work for me :( , after launching the browser I see info about accepting or rejecting cookies and I can't get to the search element .Error > selenium.common.exceptions.ElementNotInteractableException: message: element not interactable
this will happen when a popup window blocks the element that is trying to be clicked. i think he had the similar thing when the language popup occured for example.
I know that this may be asking for a lot, but could you make a tutorial on how to run parallel testing with selenium and pytest? Or whichever other tools you think are better for running multiple test cases at once?
I would like to do this with brave browser which is also based on chromium, chromium version my brave instance is 122 while the downloaded version of the chrome driver is 123, I am unable to get driver version 122 nor am I able to update the brave browser. (win64)
I'm having an issue at 11.05 when google opens I get a pop-up asking to accept/decline cookies, because of this "the tech with tim" doesn't get inputted, instead the window with google closes immediately. Do you know how I can stop that pop-up from showing?
Hello. I am a beginner and I use VSC as well. For some reasons, when I run the exactly same code you typed, it opens my chromedriver without accessing the link. Why is that?
Guys why is the "stale element not found" error automatically fixed itself? I meet this bug muptile times and dont know why it can fix itself everytime i rerun the program
I'm wanting to run a bot for an agency that my wife works for. Urgent shifts pop up fairly often. But, from what I suspect. Someone else is running a bot and snapping them up before she can get to them. I'd like to combat that, but there's no way to be sure. What I'm wanting to know is if there any way to detect whether or not the agency can detect bot activity. Since her ID is connected to the account. I won't be able to just spoof my IP. Any help would be appreciated.
Hey can someone please help me I am desperately looking to resolve this issue. I want to perform the same task but in my regular chrome browser instead of testing browser. Will it be possible? If yes then how?
I keep getting an error on the service line (line 6): driver = webdriver.Chrome(service=Service(executable_path =chrome_driver_path), options=options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: 'module' object is not callable
@@alexlh_h Thank you. That wasn't the problem. I figured it out about an hour later. I messed up an import. I did import this as that, instead of from this import that. Five years in and still making these silly mistakes 🐸
not sure why you do this extra step of downloading a webdriver and including it with Service instead of just using webdriver Chrome without the service parameter
hello sir , i have no experience of coding . how can i learn to make automation bots or integrating api (i dont know what this is but it pays good on upwork ) ? how long do i need to learn it ? I need to come up with money by the end of july for my moms surgery
one thing I'll add in here, you need to open the driver before selenium can actually use it. I was getting errors of selenium not being able to find the driver even though my route was correct. as soon as a double clicked on the driver file and opened it, selenium was able to open the browser. I use MAC
Just wondering if anyone else has been trying to get past the collect data popup that appears when you directly open google using this method I cant interact with the search bar
hey some one help me i try to make my router restart using this libarary but it wont work it stuck and show error while confirmation windos not popup and i try everything but it wont work why ?/ any soluction for this
I had to add the following after driver.get() to get the cookies pop-up to be dismissed everytime: # Wait for the cookie pop-up and accept it try: accept_cookies_button = WebDriverWait(driver, 10).until( EC.element_to_be_clickable((By.XPATH, "//button[.//div[text()='Accept all']]")) ) accept_cookies_button.click() # Click the "Accept all" button except Exception as e: print("No cookie pop-up found or timed out:", e)
Hi Tech With Tim, i follow your tutorial and it works super fine! learn some basic from you but i encounter some issue. how to use if and else if i want a button to be clickable. if not clickable then auto refresh until it become clickable?
tim whats your vs code settings for syntax colors I've tried some methods but none of them was working for example (ctrl + K + T) can you make a video about that or if you already have one tag me please
Then that means you have to install pip first! But even before that check if python is installed on your pc or not by typing: python --version On your cmd/ terminal
Hi Tim, thanks so much for putting the tutorial out there. I noticed that when I typed in executable_path, it gave me an error message (unresolved reference) for some reason?
What makes me feel suspecious about the comments is that I hardly find anyone facing an issue, while if you're following the same steps you WILL definitely face issues with the code. But the comments section is full of angels
I'm sure they are not real people
For your kind information, most people watch this to just have an overview of how it works. For development docs are available officially
just like the video, theyre all bot
this tutorial is just outdated. It worked at the time, but selenium updated their library, changing a bunch of things
DUDE I NEEDED THIS AND YOU JUS UPLOADED IT XD
Somewhy, when I run the ''python main.py'' command in terminal, I don't get anything, chrome doesn't start, nothing happens, at all.
Every time I execute my code, Chrome shows the message that I need to select a browser to set as default, I already did that and made sure to re-do it just for the issue to remain, any solutions?
set argument option to "--disable-search-engine-choice-screen"
@@abiodunjohn9790 Thanks a lot, I can't tell you how many hours I spent trying to figure this out lol
Which vs code theme do u use?
Monokai
3:20
@28:50 If you want to go straight to the html element in inspection (here: the number of cookies), click on the arrow in the dotted square at the top left corner of the inspection window (it'll turn blue) and then click on the element on the webpage you want to find in the html. The inspection window will then take you straight to the html where the element is at.
Having said that: great video!
One question still remains: how to upload Selenium to a remote server and run it? For me, it's #1 reason why I try to avoid using Selenium.
Create an API for your selenium script and host it on a linode instance. There are tutorials for both.
So what do you use?
You can use a docker container. There is containers with selenium already installed.
Look at AWS CloudWatch Synthetics. It can use selenium and save the screenshots, run on a schedule and alert you if the tests start failing.
Using a Linux server is doable but much more complex
Hopefully this helps someone, I was having issues around 28:24 and getting the following error: "Message: stale element reference: stale element not found".
This seemed to be because the page would load after clicking the language?
I added time.sleep(5) to the line before finding the cookie and it solved the error. I'm not sure why the WebDriverWait function wasn't working as intended though, I'm assuming it was finding the cookie after the language was pressed but due to the loading screen popping up, Selenium ended up losing the cookie and errored out?
that worked for me!
What about an actual robotic mouse mover and clicker... impossible to detect a bot then...hardly high tech would work like a 3d printer nozzle
Love your tutorials. I use xpath quite often when trying to find what to click on. In chrome, when you right click and inspect an element, it brings up the page source. Then if you right click the item that you are looking for, you can copy the xpath and paste it in your program as well.
It’s been years now and you still manage to release content when I need it the most. You just clutch dude ❤
Hey this is paid stuff right?? Bright data is paid. I can't do it do it for free.
No the web driver and everything else is free
You should do an updated selenium series 🔥 would love that, some automation testing for things like SDET or QA
if you run into COOKIE pop up issue that has to be accepted watch the video from 18:14
Been trying to figure out this for the last 2 days and could only find outdated and irrelevant videos. This video was really what i needed and even more. Props to you bro!
Bro what you trying automate?
Have you found more videos about the slenium?
When I search YT or Google I always set my search to find stuff in the last year only.
Thanks for your selenium tutorials I have made 20k$ earnings as freelancer web scraping in Upwork.
علمني معك اريد ان اربح معك 20 الف دولار اخي
You go way too fast for this 65-year-old brain, but I understand, a slower pace would be boring for young programmers. But for the first time, I have a handle about the concepts of web scraping. You are using the Selenium Python library to bot web surfing. Too cool!
If u 65 why u coding?
@@Alien-by3gb It's a hobby of mine, ever since PCs hit the market. I remember when Apple IIs were the rage. I've been messing around with programming ever since.
Is no one else getting ElementNotInteractableException: Message: element not interactable?
I had same issue when testing Google, I suppose because of another window covering search bar. I switched to another browser like DuckDuckGo and code worked.
10:30 get_element is deprecated. Now it's called find_element
service=service didn't run. It gave me a traceback error.
did u fix it?
Hey Tim how do i fix it if chrome driver is 120.0.6099.62 but mine is 120.0.6099.63
hi Im getting this error when trying to install chrome driver,
Google-Edge-Cache: forbidden
Error: 7
please help me with it
What do i do if chroome cookies consent block me from doing anything ?
Btw i solved it myself, u search by xpath instead of class. You input the declines button xpath and then also a time.sleep(2) so the cookies have time to load properly
I dont know where my selenium folder is man, i installed it through Pycharm.. dont know the default location.
is there a free alternative to brightdata?
Does anyone know how to have the browser open with the default account? Mine always opens without it and its an issue, especially with SSO.
yup same here.
when try to login into gmail it says "could nkt sing in , browser not secure" how to solved it?
I really love Tim tutorial for it conciseness and Simplicity
Thanks for always serving us the best
Just a question, instead of waiting for 5seconds for the elements to exist. Can you implement some kind of a loop to keep searching for the element until they do exist?
Would this best be done with a while loop, and what would it look like?
Hi, Tim. Wouldn't be easier to use webdriver_manager library where it gets the last version of the driver to match the browser you have installed? because everytime you have a version upload you have to download it and retest this?
Fucking Great Video My Man, I have been getting errors everytime when i try to get the selenium working...
after watching this video i solved my problem and its workingggg.
Hi there, I'm having a major issues with my paths, I've added the driver to the PATH, I've pinpointed it specifically using an exact path, and a local path...still, it doesn't find the chrome driver.
Message: unknown error: cannot find Chrome binary
Stacktrace:
It's been plaguing me and stopping my progress on every tutorial....please help! Thanks!
still having issues with this?
nothing is happening when i try run google. i dont see selenium on the top left as you have, but it was innstalled...im stuck
How to be undetectable, especially when we scrape small data from < 10 videos from Tiktok? Can anyone help me?
i cant find the same version of the webdriver
I can't use the driver since my Mac displays an error saying it can't verify that this app is free from malware. Has anyone had that issue?
how to disable the pop up page asking to refuse or accept the chart please
great video btw
@@tilltheend6634 weird that tim still did not answer this as lots of ppl had this question already
@@marcmuehleisen i had the solution once with chatgpt
What did you ask?
Merci pour tes supers vidéos ! Voici un post à venir qui pourraient intéresser plusieurs abonnés et autres, c'est le fait de pouvoir trouver comment cliquer sur les choix de demandes de consentements comme sur le site Mappy, qui contient une masse d'infos de Pros et surtout leur email..., ais il y a des fenêtres qui sont bloquantes et difficiles à contourner ("Accepter & Fermer" + "Continuer sans accepter" + "Connexion" ...), merci pour ton écoute? Roby
It's a little disappointing knowing how difficult it is to avoid detection and all the extra steps you have to take. I have to login to our work website once a day to check some boxes, so I wanted to just automate that boring task and was excited about figuring it out, but now knowing I'll probably get blocked for being a bot really took the wind out of my sails lol great video tho. I'm sure I'll use this information... Somehow.
Not really… build showcase it as flaw in the system to the hr
do you have to do it on a large scale? Can you just use pyautogui instead?
if you would use normal IDE like PyCharm, you never met attr errors
Selenium just removed this get element method in version 4.3.0
It doesn't work for me :( , after launching the browser I see info about accepting or rejecting cookies and I can't get to the search element .Error > selenium.common.exceptions.ElementNotInteractableException: message: element not interactable
this will happen when a popup window blocks the element that is trying to be clicked. i think he had the similar thing when the language popup occured for example.
Great Video Tim, Thanks for Sharing!!
I know that this may be asking for a lot, but could you make a tutorial on how to run parallel testing with selenium and pytest? Or whichever other tools you think are better for running multiple test cases at once?
Great tutorial, clear and to the point. Thanks!
I would like to do this with brave browser which is also based on chromium,
chromium version my brave instance is 122 while the downloaded version of the chrome driver is 123, I am unable to get driver version 122 nor am I able to update the brave browser. (win64)
I'm having an issue at 11.05 when google opens I get a pop-up asking to accept/decline cookies, because of this "the tech with tim" doesn't get inputted, instead the window with google closes immediately. Do you know how I can stop that pop-up from showing?
Did u get answer?
thank you
Hello. I am a beginner and I use VSC as well. For some reasons, when I run the exactly same code you typed, it opens my chromedriver without accessing the link. Why is that?
Guys why is the "stale element not found" error automatically fixed itself? I meet this bug muptile times and dont know why it can fix itself everytime i rerun the program
How u disabled asking about cookies?
I'm wanting to run a bot for an agency that my wife works for. Urgent shifts pop up fairly often. But, from what I suspect. Someone else is running a bot and snapping them up before she can get to them. I'd like to combat that, but there's no way to be sure. What I'm wanting to know is if there any way to detect whether or not the agency can detect bot activity. Since her ID is connected to the account. I won't be able to just spoof my IP.
Any help would be appreciated.
What’s the point of creating the service object if when you create the driver object the browser still opens when running the code from the IDE?
Excellent! Thank you very much for making and sharing this video.
Great help!
Thanks, but my Mac mini won;t let me run that file!
Hey can someone please help me I am desperately looking to resolve this issue. I want to perform the same task but in my regular chrome browser instead of testing browser. Will it be possible? If yes then how?
thanks for video and git link 😘😘😘😘
I keep getting an error on the service line (line 6):
driver = webdriver.Chrome(service=Service(executable_path =chrome_driver_path), options=options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'module' object is not callable
chrome_driver_path you need to change that
@@alexlh_h Thank you. That wasn't the problem. I figured it out about an hour later.
I messed up an import.
I did import this as that, instead of from this import that.
Five years in and still making these silly mistakes 🐸
not sure why you do this extra step of downloading a webdriver and including it with Service instead of just using webdriver Chrome without the service parameter
is it possible to make a robot that monitor a website name BLS international visa embacy and robot notify me when appointment date are available???
hello sir , i have no experience of coding . how can i learn to make automation bots or integrating api (i dont know what this is but it pays good on upwork ) ? how long do i need to learn it ? I need to come up with money by the end of july for my moms surgery
I'm having a hard time installing selenium. I can't figure out and I have python path and extension installed.
Ok update i have it installed however... now im have a hard time to run the script to open google
one thing I'll add in here, you need to open the driver before selenium can actually use it. I was getting errors of selenium not being able to find the driver even though my route was correct. as soon as a double clicked on the driver file and opened it, selenium was able to open the browser. I use MAC
Help : when i try to click on a element the browser just closed and the programme stops
Just wondering if anyone else has been trying to get past the collect data popup that appears when you directly open google using this method I cant interact with the search bar
if i have do it and nothing changes , what's wrong??? its not opened the chrome.....
LETS GO, UPDATED VIDEOOO
You are a genius 🔥
Your effort is remarkable ❤
can't we just use 'from selenium import * '?
I came to look for copper and I found gold. thanks for the video. you saved me. I hate pychar. I love vsc.
hey some one help me i try to make my router restart using this libarary but it wont work it stuck and show error while confirmation windos not popup and i try everything but it wont work why ?/ any soluction for this
Thanks for this great content. I love the way you explained in details
great!!, thanks for the tutorial just what i needed
I had to add the following after driver.get() to get the cookies pop-up to be dismissed everytime:
# Wait for the cookie pop-up and accept it
try:
accept_cookies_button = WebDriverWait(driver, 10).until(
EC.element_to_be_clickable((By.XPATH, "//button[.//div[text()='Accept all']]"))
)
accept_cookies_button.click() # Click the "Accept all" button
except Exception as e:
print("No cookie pop-up found or timed out:", e)
Do I have to update the chrome driver every time Google updates actual Chrome?
what if the ID and class names are changing every time you log in to the website?
Hi Tech With Tim, i follow your tutorial and it works super fine! learn some basic from you but i encounter some issue. how to use if and else if i want a button to be clickable. if not clickable then auto refresh until it become clickable?
Great one, this is what i'm looking for, Automation, web scraping, bots, pytho automation, Qa automation.. Thank you so much. You are amazing.
As soon as I open up the editor there's no tab for selenium.....
Your VScode theme name?
Can i make option with bot doing order according to telegram channel
just a question. Can i use this bot to make shein new user in shein games ?
IF IT DOES NOT WORK 100% CHECK CAPITALIZATION
I feel nostalgic, I remember watching your selenium series a few years ago
You are the BEST
Is this working if the app is saml integrated??
can someone tell me where he got the class gLFyf because i didnt see it
tim whats your vs code settings for syntax colors I've tried some methods but none of them was working for example (ctrl + K + T) can you make a video about that or if you already have one tag me please
Monokai syntax theme
also you can use driver.implicity_wait(10) instead of time.sleep(10)
Does selenium still need us to install the drivers, i thought its now installed with the selenium 4.10
Спасибо за подробный разбор, новая связка на отлично. Два круга, все сработало!
Thanks Tim bro😊😊😊
This is a video made by a bot made for a bot😂
I have the issue with pip install selenium. It always gives command not found error .
Then that means you have to install pip first! But even before that check if python is installed on your pc or not by typing:
python --version
On your cmd/ terminal
Can i do this for automate an telegram bot? Please if somebody can fast reply me. Thanks.
Есть другие библиотека для этого просто найди туториал для телеграм бота
Hi Tim, thanks so much for putting the tutorial out there. I noticed that when I typed in executable_path, it gave me an error message (unresolved reference) for some reason?
Did you put chromedriver.exe in the same folder as your .py file?
Excellent lesson thanks for explaining each step
Great video! Been looking for something that explains this process for a while.
You started to go faster and i losted you in 33:30