Splunk AppDynamics

Disabling browser alerts in synthetics scripts

CommunityUser
Splunk Employee
Splunk Employee

Hi,

I have configured a synthetic job to execute a python-selenium script to test a website. The browser shows an alert ("location information is unavailable") I have tried profiles in firefox and chrome both to load the instance blocking these, but i continue to face this issue. I believe it is due to AppD creating it's own instance and ignores the code. Please help.

Below is the code that I am using in Chrome

opt = Options()
opt.add_argument("--disable-infobars")
opt.add_argument("start-maximized")
opt.add_argument("--disable-extensions")

# Pass the argument 1 to allow and 2 to block
opt.add_experimental_option("prefs", { \
"profile.default_content_setting_values.media_stream_mic": 2,
"profile.default_content_setting_values.media_stream_camera": 2,
"profile.default_content_setting_values.geolocation": 2,
"profile.default_content_setting_values.notifications": 2
})

driver = webdriver.Chrome(chrome_options=opt)

Labels (1)
0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi Sumit,

I understand that this a popup and you can't interact with this element as its not a WebElement, so you have to handle it before the browser launches a site.

As Synthetic launches it's own browser session, did you try handling these popups within script itself and also let us know if this is a blocking factor with synthetic usage in your environment?

Thanks,

Deepanshu

0 Karma
Get Updates on the Splunk Community!

Secure Your Future: A Deep Dive into the Compliance and Security Enhancements for the ...

What has been announced?  In the blog: “Preparing your Splunk Environment for OpensSSL3”, we announced the ...

AppDynamics is now part of Splunk Ideas

Hello Splunkers, We have exciting news for you! AppDynamics has been added to the Splunk Ideas Portal. Which ...

Advanced Splunk Data Management Strategies

Join us on Wednesday, May 14, 2025, at 11 AM PDT / 2 PM EDT for an exclusive Tech Talk that delves into ...