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!

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...