0 votes
in Selenium by
When should I use '{{ }}'?

1 Answer

0 votes
by

Always use {{}} for variables, unless you have a conditional statement, such as "when: …". This is because conditional statements are run through Jinja, which resolves the expressions.

 For example:

      echo “This prints the value of {{foo}}”

      when : foo is defined

Using brackets makes it simpler to distinguish between strings and undefined variables.

This also ensures that Ansible doesn't recognize the line as a dictionary declaration.

Related questions

0 votes
+1 vote
+1 vote
asked Mar 5, 2021 in D Programming by SakshiSharma
0 votes
0 votes
asked Apr 28, 2022 in Azure Cosmos DB by sharadyadav1986
...