Splunk AppDynamics

Handling Cookie page in Synthetic scripting

Mahendra_Shetty
New Member

Hello Everyone,

Wanted to know how to handle the cookie page in Synthetic scripting while creating a user journey, what command to use to accept/reject cookies any suggestion would be great help.

Thank you, Mahendra Shetty

Labels (1)
0 Karma

Mahendra_Shetty
New Member

Hi @Ryan.Paredez , 

Thank you for your response.

The page you advised to check is telling more information about BT and RUM and not sure about Synthetic monitoring. I 'm facing issue with how to accept the Cookie page while developing the script for user journey, need some information on how to accept/reject the cookie consent that appears very before the application base page.

Or guide me, if my understanding is not right here.

Thank you, Mahendra Shetty

0 Karma

tezza_chen
Path Finder

Hi @Mahendra.Shetty 

Not sure if this is what you looking for:

from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()

driver.get('https://www.cookiebot.com/en/uk-ie-cookie-compliance/')
waitTime=30

# Accept cookies
try:
    cookie_button = driver.find_element(By.ID, 'CybotCookiebotDialogBodyLevelButtonLevelOptinAllowAll')

    print("button located")
    cookie_button.click()

except Exception as e:
    print("cannot find button")

Take the given website for instance, upon loaded it prompts for cookie acceptance/acknowledgement: "Deny", "Customize" or "Allow all". In this example, I simply accept i.e., "Allow all". To do that, using browser dev tool, we  can inspect the ID of that link button. 

regards,

Terence

0 Karma

iamryan
Community Manager
Community Manager

Hi @Mahendra.Shetty,

Please check out this AppD Docs page: https://docs.appdynamics.com/appd/22.x/latest/en/end-user-monitoring/browser-monitoring/browser-real...

Alternatively, you can contact AppD Support or your AppD Rep

How do I submit a Support ticket? An FAQ 

0 Karma

Mahendra_Shetty
New Member

Team, Any suggestion would be of greatly appreciated.

0 Karma
Get Updates on the Splunk Community!

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureOn Demand Now Step boldly into the AI revolution with enhanced security ...