Open lollofos opened 2 years ago
I'd double check your code..
crome_options = webdriver.ChromeOptions()
should be
import undetected_chromedriver.v2 as uc
chrome_options = uc.ChromeOptions()
Hello @mdp18 , @lollofos . I have the same issue. I am using these 2 videos to set up my use case: https://youtu.be/dYAytG965ZE?list=PLuJJZ-W1NwdoTS0UXLUZoPH7GQ0kURHgH https://youtu.be/QvaZLa_FKmY?list=PLuJJZ-W1NwdoTS0UXLUZoPH7GQ0kURHgH The fact is since I am setting up an automated test , I need selenium(an automated testing tool) to be undected by chrome. Else Chrome will block my script execution (I'll not be able to log in). Here is my code, written in python :
#--------------------------getting into Myriad login page--------------------------------------
def login():
# find the "email" and "password" fields then fill them
#but before let s locate them
WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.ID, "userEmail")) )
WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.ID, "password")) )
driver.find_element(By.ID, "userEmail").send_keys("myaccount@gmail.com")
driver.find_element(By.ID, "password").send_keys("123456")
#find out the login Button location then click on it
loginClick = driver.find_element(By.CSS_SELECTOR, ".customStyle__ButtonDefault___1k2JQ").click()
def main():
logged = login()
#------------------------------------------------end login part----------------------------------------------------
if __name__ == '__main__':
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support import expected_conditions as EC
import undetected_chromedriver.v2 as uc
chrome_options = uc.ChromeOptions()
driver = uc.Chrome()
driver.get("https://pubpp-developers.myriadgroup.mobi/login")
I am still going though that issue:
May I know where I am wrong please? Else, could you please tell me if there's another way to get undetected by Chrome while using selenium python webDriver
Run :
import undetected_chromedriver as uc
print(uc.Patcher.data_path)
And check you have the right permissions for the given folder.
Until yesterday my code was perfectly working but today when I run it i get an error saying
WebDriverException: Message: '062df107007c8a29_chromedriver.exe' executable may have wrong permissions. Please see https://chromedriver.chromium.org/home
This is my codeIf i run the code without the uc, everythink goes perfect.
Chromedriver & chrome are both updated to latest versions