Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Sunshine And March Vibes (2025 Wallpapers Edition)

      May 18, 2025

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      May 18, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      May 18, 2025

      How To Prevent WordPress SQL Injection Attacks

      May 18, 2025

      I need to see more from Lenovo’s most affordable gaming desktop, because this isn’t good enough

      May 18, 2025

      Gears of War: Reloaded — Release date, price, and everything you need to know

      May 18, 2025

      I’ve been using the Logitech MX Master 3S’ gaming-influenced alternative, and it could be your next mouse

      May 18, 2025

      Your Android devices are getting several upgrades for free – including a big one for Auto

      May 18, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      YTConverter™ lets you download YouTube videos/audio cleanly via terminal — especially great for Termux users.

      May 18, 2025
      Recent

      YTConverter™ lets you download YouTube videos/audio cleanly via terminal — especially great for Termux users.

      May 18, 2025

      NodeSource N|Solid Runtime Release – May 2025: Performance, Stability & the Final Update for v18

      May 17, 2025

      Big Changes at Meteor Software: Our Next Chapter

      May 17, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      I need to see more from Lenovo’s most affordable gaming desktop, because this isn’t good enough

      May 18, 2025
      Recent

      I need to see more from Lenovo’s most affordable gaming desktop, because this isn’t good enough

      May 18, 2025

      Gears of War: Reloaded — Release date, price, and everything you need to know

      May 18, 2025

      I’ve been using the Logitech MX Master 3S’ gaming-influenced alternative, and it could be your next mouse

      May 18, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»Selenium Java best practices for handling different languages and locations, and setting dynamic architecture

    Selenium Java best practices for handling different languages and locations, and setting dynamic architecture

    July 9, 2024

    Im currently working on a platform that has multi-language options and also the language is defined by IP. So Im trying to build an architecture for testing both scenarios dynamically… The domain is always the same: Example: www.page.com (If you are logged in from Britain the web application is loaded in English, if you are visiting the page from France the page is loaded in French.)

    I have an idea to make different abstract classes with error messages for example:

    public class ErrorMessagesEN {

    public static final String MANDATORY_FIELD = “This field is mandatory…”;
    public static final String SOME_OTHER_ERROR_MSG = “Some error message on english”

    // etc…..

    }

    public class ErrorMessagesFR {

    public static final String MANDATORY_FIELD = “Error message in French”
    public static final String SOME_OTHER_ERROR_MSG = “Some error message on
    French”

    // etc…..
    }

    In the test method i provide parameter “EN” or “FR” for example:

    homepage.signIn(String location)

    So is there any option to make for example:

    if (location==”EN”) {
    // load the ErrorMessageEN
    // etc……
    }

    The keys for the Strings are the same but the classes are different, so how can I provide different imports of the classes by the location parameter for example? Or are there any better approaches for this situation? Any links or ideas?

    Thanks!

    PS. If you need more info to help me please ask! 🙂

    Source: Read More

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleDoes anyone know any low code or nocode packages (open-source or commercial) for load and longevity testing a mobile app?
    Next Article A Survey of Controllable Learning: Methods, Applications, and Challenges in Information Retrieval

    Related Posts

    Development

    February 2025 Baseline monthly digest

    May 18, 2025
    Artificial Intelligence

    Markus Buehler receives 2025 Washington Award

    May 18, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    NVIDIA’s AI odyssey: from humble origins to a $2 trillion company

    Artificial Intelligence

    Guide to Virtual Bookkeeping and Automation

    Artificial Intelligence

    Taking the Pain Out of Cybersecurity Reporting: A Practical Guide for MSPs

    Development

    How Heroku reduced their operational overhead by migrating their 30 TB self-managed database from Amazon EC2 to Amazon DynamoDB

    Databases

    Highlights

    Development

    How researchers are using GitHub Innovation Graph data to estimate the impact of ChatGPT

    July 17, 2024

    We launched the GitHub Innovation Graph to make it easier for researchers, policymakers, and developers…

    CyberArk to Acquire Venafi for $1.54 Billion, Enhancing Machine Identity Security

    May 21, 2024

    This previously hidden Windows 11 feature is even better than we expected

    January 27, 2025

    CVE-2025-46398 – Fig2Dev Stack Overflow Vulnerability

    April 23, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.