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!

Dashboards: Hiding charts while search is being executed and other uses for tokens

There are a couple of features of SimpleXML / Classic dashboards that can be used to enhance the user ...

Splunk Observability Cloud's AI Assistant in Action Series: Explaining Metrics and ...

This is the fourth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how ...

Brains, Bytes, and Boston: Learn from the Best at .conf25

When you think of Boston, you might picture colonial charm, world-class universities, or even the crack of a ...