
Hi @成坤 李,
This popup is controlled by the setting "Allow Microsoft to save your browsing activity including history, usage, favorites, web content, and other browsing data to personalize Microsoft Edge and Microsoft services like ads, search, shopping and news“. The path is Edge settings --> Privacy, search, and services --> Personalization & advertising. Once it is set ON, there will be no such popup again.
To achieve it in Python for Selenium tests, you can use the following code:
from selenium import webdriver
from selenium.webdriver.edge.options import Options as EdgeOptions
option = EdgeOptions()
prefs = {
'user_experience_metrics': {
'personalization_data_consent_enabled': True
}
}
option.add_experimental_option('prefs', prefs)
driver = webdriver.Edge(options = option)
Then you won't see this popup in your Selenium test.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best Regards,
Shijie Li