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

Store Web Variables

Overview

The "Store Web Variables" feature in our automated testing framework allows for the capturing and storing of data from web elements during tests. This data is then saved as global variables, which can be used later in the testing process. This feature is crucial for scenarios where the data from one part of the test needs to be reused in subsequent steps.

How It Works

Data is stored by specifying the SAVE action in the CSV configuration file, which is used to define the test steps. The data from a specified web element is then captured and stored as a global variable.

CSV File Configuration for Storing Variables

To store data from a web element, the following columns in the CSV file are crucial:

  • Example Entry:

    PAGE_NAME,WAIT_TYPE,SCROLL_TYPE,ELEMENT_NAME,ACTIONS,SEND_KEYS,VALIDATION,VALIDATION_TYPE
    iframe,NONE,NONE,firstFrameElement,SAVE,testFrameName,NONE,NONE
  • Key Columns:

    • ELEMENT_NAME: Identifies the web element from which to capture data.

    • ACTIONS: Set to SAVE to indicate data storage.

    • SEND_KEYS: Specifies the name under which the captured data will be stored as a global variable.

Using Stored Variables in Tests

Once the data is stored, it can be utilized in various ways:

  • In Custom Tailor-Made Code:

    • Custom methods can access these stored variables via global variables.

    • Example:

      CustomClass:getSavedVariables
  • Direct Usage in Test Steps:

    • The stored data can be directly used in subsequent test steps.

    • Example:

      SwagLabs,VISIBILITY,NONE,userName,SEND_KEYS,GlobalVariables:testFrameName,NONE,NONE
    • In this example, the userName field will be filled with the text saved under the name testFrameName.

Benefits

  • Data Reusability: Enables the capture and reuse of data across different parts of the test.

  • Dynamic Testing: Facilitates testing scenarios where dynamic data or data dependent on previous steps is required.

  • Efficiency: Improves test efficiency by reducing the need for redundant steps to capture data.

Conclusion

The "Store Web Variables" feature is a vital part of our testing framework, providing an efficient way to capture and reuse data within the testing process. By enabling the storage of data as global variables, it allows for more complex and dynamic testing scenarios, enhancing both the flexibility and the depth of your automated tests.

PreviousWeb Tailor-Made codingNextWeb & API integration

Last updated 1 year ago

Was this helpful?

🌐
📝