nice job bro just wanna ask that if I have a webpage which has annoying login page after every 10 minutes... would more likely run that command in powershell again and again , I basically am thinking of something exe running in background you know... :0 thanks
Many webpages nowadays have an extra layer of verification using images to avoid robots. For example, 9 images are displayed and you select all the ones with, say a car. How would you bypass that step if such a case was encountered?
The video is great! I wanted to use this to automatically login to my university account when course selection begins instead of waking up early for it, but my university uses DUO (two step authentication) app. I tested out and it seems like whenever I manually login, DUO can "remember" me and not ask for authentication for 24 hours but when I run the script it recognizes that it's an "automated test software" and requires me to verify my identity every time. I wonder if there's a way to make it looks like I'm not using an "automated test software" or to have DUO "remember" me for 24 hours even though I'm running the script.
File "E:/DareTheFlare/python projects/jarvis.py", line 4, in driver = webdriver.chrome("C:\\Users\\acer\\Desktop\\chromedriver.exe") TypeError: 'module' object is not callable I get this problem, any help would be amazing!
from webdriver_manager.chrome import ChromeDriverManager driver = webdriver.Chrome(ChromeDriverManager().install()) this is a better way of defining the driver as it will automatically install the correct driver for you
gearsofengineer Hey man thank you so much for your kind words. It is truly appreciated. A simple "Like" on my videos would be more than enough. People like you are what keeps me motivated to continue pushing out these videos. Thank you again and have a good one!
Thanks a lot you really helped me ! I didn't have an id for the button (it was a "aqa-id", weird no?) but I used xpath to click on it then Thanks keep it up !
Gmail did not give me access to signin with automation but i bypass login page but problem is that do you have any idea how to save login details in it because when i login and again it is telling to verify my number again and again. ( maybe cookies help us how to implement, can you teach us)
hey this code is great for beginners like me! thanks for this but I do have a question! I tried running this code on iCloud/finder and it doesn't work. I'm guessing there is some kind of extra layer? I get an error code that says that the element for the username is not found. Any ideas?
Hi, thanks for the video. After logging in, is it possible to now get a Selenium driver object for the website you've logged in to? I.e. how can I now use Python to interact with the website after having logged in to it?
I tried using pip and it told me: pip : The term 'pip' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + pip list + ~~~ + CategoryInfo : ObjectNotFound: (pip:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
Hi man, great video. I love you don't edit the troubles that you encounter along the way. Can you take de data to the log in from a .xlsx worksheet and paste one row at a time (is not for a login proccess is for automated a web search with multiple cases) and then retrieve the response page. Thank you.
I have question is it possible to make an automatic login possibility at any time lets say like . 9:30 log in at this website and stay there for 30min ,then log out.
using the wait() you can give it a value of 30 mins and also using wait you could probably figure out the current time , subtract 9:30 from it ,convert it into second and input into the current time in seconds and have the script run always in a infinite while loop or something like that im sure there are better ways and librarys for this but this would be a basic solution
The website that I've been attempting to scrape doesn't have an ID so I've been using find_element_by_name instead but I'm getting a noSuchElement exception error. Is there another way to retrieve this information?
Hi Dani Zeilmann. Looks like the issue is that chromedriver also needs to know where chrome is. In your case it is at a non-default path. So you need to specify the complete path to the Google Chrome binary. Add this bit of codes to your python script filling in the path in the chrome binary location or where chrome.exe is installed on your machine. On Windows you can find this out by right-clicking on your Google Chrome shortcut and go to property, copy of the path under the Target. It should look something like this "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" : options = webdriver.ChromeOptions() options.binary_location = r"\chrome.exe" Then under the driver code on line #7 in my video, add a second parameter for the chrome options. For my video example, it would look like this: driver = webdriver.Chrome("C:\\Dev\\WebDrivers\\chromedriver.exe", chrome_options=options) Hopefully this helps resolved your issue.
File "E:/DareTheFlare/python projects/jarvis.py", line 4, in driver = webdriver.chrome("C:\\Users\\acer\\Desktop\\chromedriver.exe") TypeError: 'module' object is not callable I get this problem, any help would be amazing!
this would be possible using a the wait() function what you would need to do is make python wait for a certain amount of time , then redifne the username and password use driver.close() to close the tab currently open then have python go to the other website via url and redo the process of finding the elements and logging in like as shown in this video , do this for every website you want , a tip would be to build a function that does this for one website and have the username , password, url , elements ...etc be variable that way you can reuse code instead of writing over and over again
raise exception_class(message, screen, stacktrace) selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 81 getting this error
Hi @Rajesh Kumar. Looks like a incompatible ChromeDriver versioning issue. Please give the following steps a try for a resolution: 1) Open a Chrome browser and go to this url chrome://settings/help and find your Chrome version e.g. Version 81.0.4044.69 (Official Build) (64-bit) 2) Then go to this URL sites.google.com/a/chromium.org/chromedriver/downloads and download the ChromeDriver of your version. Look for the current release with the first two digit that correspond with your version of Chrome. Download and extract the chromedriver.exe. 3) In the code from this video on line 7, set the path of the chromedriver to the newly downloaded chromdriver. Hope this helps! Have a good one.
Thank you, but what if i dont to go to the process of Windows Power Shell, how do i do it? Like instead create a unique file that i can click and open the website smoothly
Heya I need a help please can you please help me, sir. I am doing login in my amazon account but always it asks for otp so how can I bypass or say how can I let it remember to not ask for otp every time as we are using webdriver. In my regular browser not ask for OTP is on but not able to do that in driver so help me to solve this, please.
you helped me a lot with this video! I'm trying to get the "sign in" button to be found by ID but am having issues because the inspect element doesn't show ID... Tried name but its still showing "unable to locate element" might try CSS selector or something but regardless this video was helpful... if you have any tips let me know
Hi Michael, This video was great! I'm stuck on one problem: the website I'm logging into does not have an ID for the sign in button, so I'm using find_element_by_name. The program runs, however, after it types in the username and password, then refreshes and I'm stuck on the same page. Do you know why this is happening?
Hey Michael, great video I am trying to log into a google account and there is no “id”. I tried class but an error message says, “WebDriver object has no attribute ‘find_element_by_class’ “ any help would be amazing
@OMG_ITS_JJ I'm glad you like the video. To clarify, did you try to locate the element by class with "find_element_by_class_name"? That one is a valid Selenium WebDriver's method whereas "find_element_by_class" is not.
@@juanjo3002 it also depends upon the website which you use, if you have a loader on a site, then it may not be able to locate the element so you have to wait for the loader to complete...this is a bit advanced.
As soon as I start your script I get this error: Warning (from warnings module): File "C:\Program Files\Python38\lib\getpass.py", line 100 return fallback_getpass(prompt, stream) GetPassWarning: Can not control echo on the terminal. Warning: Password input may be echoed. How do I fix this?
This video is very useful and very easy to understand 💯 Please can you make video for filling captcha for login using selenium ? I want this for my project.
Charlie Schmidt You are welcomed. I'm glad to hear you found it helpful. I will be putting out more video tutorials in the near future so if you like content such as these, consider subscribing to stay up to date and this also help my channel out as well. Thanks in advance and happy coding!
hello great script and explanation. I'm trying to make an autologin in a webpage which uses SSO over okta, do you know if there is a way to make it work?
I had to do this for it to work login_button = driver.find_element_by_id("u_0_b") login_button.submit() login_button = driver.find_element_by_id("u_0_3") login_button.submit() login_button = driver.find_element_by_id("u_0_2") login_button.submit() login_button = driver.find_element_by_id("u_0_4") login_button.submit()
yes but you would need python to press register then you would need to inspect every element that needs to be filled out and then fill them one by one with probably seprate files containing usernames and passwords and the data required then press the register button , the thing is tho if there is captcha it may not work , a wait(5) between each step may help
def readFile(): try: # delegating responsibility and making sure file is made makeFile() #here you would need to make a function for read file f = open("file.txt", "r")#here it opens your file # Using readlines() to read each line in the file # and save it to the data list Lines = f.readlines() # Strips the newline character and makes # sure its clean text data = [] for line in Lines: data.append(line.strip()) f.close() print("file was read successfully") return data except: # if an error has occured then reset the file print("error file reading encountered an issue a problem ") print("please try resetting the file") resetFile() # here you would need to make a function for reseting the file or some other error handling to pick which username you want you just need to know the index of the username or depending on the situation you can use a dict instead of an array
@@datdwaa1532 ya its some code i wrote a while ago thought it could help , its not complete tho ofcourse but the concept is there just customize it to your need
Hi Code Xtyfi, could you post your code and a little bit of detail on what problem you are running into? I'm not see a reference to an element id of sort in my code. I'm referencing the element ids of the email textbox, password textbox, and the submit button element in my video. Thanks.