ScriptlessAutomation
  • 👋Welcome to Scriptless Automation
  • Discover More About Automation
    • ⚙️Automation platform intro
    • 💡Advantages of Scriptless Automation
    • 🚀Release Notes
      • 📖Open Code
      • 📕License Code
  • Product tools
    • 📪Pre-request Tools
    • 🔧Project Dependencies
  • Automation Architecture
    • 🎨Flow diagram
  • Get Started
    • 🛠️Start with Automation
    • 📖Open Code Automation
      • 🌏Web Automation
      • ↔️API Automation
    • 🏢Maven Configuration
    • 🗜️Setting Up Maven Project in IntelliJ IDEA
    • 🎛️Scriptless Config
      • 🕸️BrowserConfiguration
        • chrome.properties
      • 👥CommunicationConfiguration
        • SlackConfiguration.properties
      • 📧MailConfiguration
        • gmailCredentials.properties
      • 🛂ReportConfiguration
        • extentReportConfiguration.properties
      • 🕵️TestManagementConfiguration
        • testRail.properties
        • zephyrscale.properties
        • testiny.properties
      • ⚙️testNgConfiguration.properties
    • 🍱TestData Configuration
    • 👨‍💼Gherkin Language and Scriptless Automation Framework
  • Automation Import Notes
    • 🎨Points to Remember
  • Automation Platforms
    • 👾ScriptlessApi Automation
      • 🖊️Introduction
      • 🗜️Api Automation Setup
      • 🔃Supported API Request Types
      • 🪧API Automation Template
      • 📚Example of API Requests
        • ⬇️GET
        • ↕️POST
        • ⤵️PUT
        • ❌DELETE
      • 🎯API Response Validation
      • 👨‍👦API Dependent TestCase
      • 📝Store API Variables
      • 📔API with JSON body
      • 🙋‍♂️Api Wait
      • 🗜️API Schema Validation
      • 🏗️API Tailor-Made coding
      • 👨‍🦯API Support Generator
      • ↘️Api Response Store Objects
      • ✍️API Test Report
      • 🚃Api Response Type Validation
    • 🌐ScriptlessWeb Automation
      • 🖊️Introduction
      • 🗜️Web Automation Setup
      • 🪧Web Automation Template
      • 🧮page_object_locators
      • 📜Web Automation Key Phrases
        • 📃PAGE_NAME
        • ⌛WAIT_TYPE
        • 📜SCROLL_TYPE
        • 👨‍💼ELEMENT_NAME
        • 🏎️ACTIONS
        • ⌨️SEND_KEYS
        • ✔️VALIDATION
        • ✅VALIDATION_TYPE
      • 👨‍👦Web Dependent Test Case
      • 🐒MOCK
      • 🛂AutomationAsserts
      • 🏗️Web Tailor-Made coding
      • 📝Store Web Variables
      • 🤼‍♀️Web & API integration
      • 🖇️Dynamic Strings
      • 🗣️ReadFile Annotation for Custom Code
      • 🖼️Page_Comparison
      • 👨‍💼Gherkin Template for Web Automation
    • 📱Mobile Automation
  • 🪶Automation features
    • 🌲Environment and System Variables
    • 🗝️KeyInitializers
      • Types of KeyInitializers
    • ✍️Reporting
      • Dashboard
      • Category
      • Tests
        • Screenshot Section
    • 👯Parallel Testing
    • 🏗️Tailor-Made Coding
  • ⏩Automation Demo
Powered by GitBook
On this page

Was this helpful?

  1. Automation Platforms
  2. ScriptlessWeb Automation

Dynamic Strings

PreviousWeb & API integrationNextReadFile Annotation for Custom Code

Last updated 1 year ago

Was this helpful?

Our automation tool is equipped with a robust system that allows for dynamic data handling based on the specified environment. This functionality ensures that the tool is flexible and can cater to various conditions such as development, testing, or production environments. Below is a detailed explanation of how this system works:

Environment-Specific Directories

Each environment, such as QA or sandbox, has a corresponding directory under the test_data folder. These directories contain property files which hold data pertinent to their respective environments. For example:

  • test_data/qa contains property files for the QA environment.

  • test_data/sandbox contains property files for the sandbox environment.

TestNgConfiguration Properties

The TestNgConfiguration.properties file is pivotal in determining which environment's data is to be utilized during test execution. It contains a key named ENV whose value is the name of the directory (environment) that the automation tool should reference. For example:

  • Setting ENV = qa in TestNgConfiguration.properties will instruct the tool to use data from the test_data/qa directory.

Dynamic Data Retrieval Process

When the automation suite is run, it reads the ENV property and dynamically selects the appropriate property files from the specified environment's directory. The data within these property files can be accessed using a unique syntax in the automation scripts:

  • $ denotes the start of a dynamic string.

  • text represents the name of the properties file (without the extension).

  • title is the key within the property file whose value you want to retrieve.

For example, $text.title will fetch the value associated with the key title from the text.properties file in the active environment directory.

Consistency Across Environments

To ensure the automation tool functions correctly, it is crucial that each environment directory contains property files with the same names. This consistency allows the tool to switch environments seamlessly without any changes to the automation scripts.

Use in SEND_KEYS and VALIDATION

This dynamic string substitution is not only limited to reading data; it is also applicable to operations like SEND_KEYS and VALIDATION. When a script is required to input or validate data, it can refer to these dynamic strings to get environment-specific values, thereby maintaining the flexibility and accuracy of test cases.

  • SEND_KEYS

  • VALIDATION

🌐
🖇️