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
Get Updates on the Splunk Community!

What the End of Support for Splunk Add-on Builder Means for You

Hello Splunk Community! We want to share an important update regarding the future of the Splunk Add-on Builder ...

Solve, Learn, Repeat: New Puzzle Channel Now Live

Welcome to the Splunk Puzzle PlaygroundIf you are anything like me, you love to solve problems, and what ...

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...