0

I'm using MS Edge with Selenium and Python to do web scraping and having an issue.

Tools and version:

Description:

The website I need to access has a security feature. It requires an access code when opening with a new browser. However, once the access code is provided once, it will be remembered if re-visiting with the same browser.

So with the old Edge Legacy browser, since I'd provided the access code once, and the browser was always launched as a normal browser by defualt, not a test browser, so it could access the website without needing a new access code every time because it was remembered. This worked very well.

Issue:

However, now with the new Edge, my Python program is now treated as a test program which launches the browser as new, and so the website requires an access code every time. This is negatively impacting my automation program. Does anyone know how to let the Edge driver open the browser as a normal browser, not a new browser as a test program?

Partial code for reference:

import selenium
from selenium import webdriver

# Locate Edge web driver
driver = webdriver.Edge(executable_path="C://Windows//SysWOW64//msedgedriver.exe")

# Maximize browser for better performance
driver.maximize_window()

# initiate web driver to launch website
driver.get("https://*****************************.com")

# Enter user credential 
login_un = driver.find_element_by_id('username').send_keys("USERNAME")
login_pw = driver.find_element_by_id('password').send_keys("PASSWORD")

# Click to log in
driver.find_element_by_id('login_btn_signin').click()

an1que
  • 405
  • 3
  • 14
  • Do you mean you want to remove the "Microsoft Edge is being controlled by automated test software" notification, please refer to [this thread](https://stackoverflow.com/questions/59299282/how-to-remove-the-infobar-microsoft-edge-is-being-controlled-by-automated-test/60111307#60111307), we could disable it by setting the **useAutomationExtension** to **false** and add the **enable-automation** argument. – Zhi Lv May 04 '20 at 06:15
  • No, the infobar doesn't bother me. I want the browser that my python initiates not to be evoked as a test program window. I want it to be a normal browser window. Before the browser update, this worked well. – an1que May 04 '20 at 15:25
  • If you want Edge to offer you save passwords, please check the Edge settings and make sure you have enabled the save password option, the details steps: Type "**edge://settings/passwords**" in the address bar and press Enter key to open the Passwords page. turn on the **Offer to save passwords** option to make Edge browser save passwords ([screenshot](https://i.stack.imgur.com/VFqea.png) ). – Zhi Lv May 05 '20 at 06:19
  • That's not what I want. Thanks – an1que May 05 '20 at 15:42
  • Do you mean you want to use the default app data profile when using selenium to automate Microsoft Edge Chromium? By using the default data profile, it will not create a new profile when using selenium to automate Edge Chromium browser. If that is the case, please check [this thread](https://stackoverflow.com/questions/60439395/), we have to add arguments to assign the user data path. If I misunderstand your problem, please explain more detail about "let the Edge driver open the browser as a normal browser, not a new browser as a test program" and feel free let me know. – Zhi Lv May 06 '20 at 01:52

0 Answers0