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
  3. Web Automation Key Phrases

PAGE_NAME

Definition of PAGE_NAME

In the context of web automation scripts, PAGE_NAME refers to a property file that contains locators for web elements. These locators are used in automation scripts to interact with the corresponding elements on a web page.

Relationship Between PAGE_NAME and ELEMENT_NAME

  • PAGE_NAME is the filename of the properties file without the extension. For example, SwagLabs refers to SwagLabs.properties.

  • ELEMENT_NAME is the identifier used within the property file to refer to a specific web element.

Example: SwagLabs.properties File

In the SwagLabs.properties file, web elements are defined with their respective locators:

pageTitle = CSS -> .login_logo
userName = CSS -> #user-name
password = CSS -> #password
loginButton = CSS -> .btn_action
errorMessage = CSS -> .error-message-container.error

Usage in Automation Scripts

In an automation script, you reference PAGE_NAME and ELEMENT_NAME to perform actions on those elements. For example:

PAGE_NAME, WAIT_TYPE, SCROLL_TYPE, ELEMENT_NAME, ACTIONS, SEND_KEYS, VALIDATION, VALIDATION_TYPE
SwagLabs, VISIBILITY, NONE, userName, SEND_KEYS, testuser, NONE, NONE
SwagLabs, VISIBILITY, NONE, password, SEND_KEYS, testpassword, NONE, NONE

Notes

  • When the automation script runs, it looks up the ELEMENT_NAME in the corresponding PAGE_NAME.properties file to find the locator.

  • This modular approach allows for easy maintenance and updates to element locators without changing the automation scripts.

  • If the given ELEMENT_NAME is not present in the PAGE_NAME.properties then automation throw below exception:

main.java.com.precisiontestautomation.exception.handling.PrecisionTestException: Failed While running test case search  Element name "page" is not present in SwagLabs.properties | Cannot invoke "String.split(String)" because the return value of "main.java.com.precisiontestautomation.automation.elementgenerator.GetLocators.getLocatorValue(String, String)" is null

Demo

PreviousWeb Automation Key PhrasesNextWAIT_TYPE

Last updated 10 months ago

Was this helpful?

🌐
📜
📃