Splunk Observability Cloud

Synthetic Browser Tests: Usage of variables

lnkir
New Member

I am trying to set up a synthetic browser test that makes use of variables. I can't seem to find information about the usage of variables in Browser Tests other than this. So far I tried to:

  • Access Global variable as a url in a "go to URL" step -> which leads to a "https:// is not a valid URL" although I can see the variable in the "variables" tab
  • Access Global/Predefined variables in "execute Javascript" steps -> undefined
  • Set variable via "Save return value from javascript" to variable var and try to reuse it in both
    -> "assert Text present" with {{custom.$var}} -> undefined

           -> "execute Javascript" with custom.var -> undefined

  • Assign var/const in "execute Javascript" step and reference it in consecutive "execute Javascript" steps -> undefined
  • Tried to access built-in variables: in "execute Javascript" tests (except those that are only available in API-Tests) -> undefined

 

  • Which raises the following questions for me:

    What is the idiomatic way to use variables in Synthetic Browser Tests? So far it seems to me that they can only be used to fill a field as its the only Action mentioned here and no other action I tried seems to support variables which would quite honestly be really dissapointing.
  • Am I overlooking any documentation?
  • Which kind of actions support the use of variables created by other steps?

 

Thank you

Labels (1)
0 Karma

lnkir
New Member

Thank you for the fast reply! This is rather unfortunate. Are there any aspirations to allow the use of variables in other actions in the future?

0 Karma

PaulPanther
Motivator

Unfortunately for browser tests you can only use the global variables to fill any fields on a web page with the "Fill in Field" action . 

Feel free to create an idea as a feature enhancement request at https://ideas.splunk.com/

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

 Are you ready to revolutionize your IT operations? As digital transformation accelerates, the demand for ...

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...