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

      Sunshine And March Vibes (2025 Wallpapers Edition)

      May 16, 2025

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

      May 16, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      May 16, 2025

      How To Prevent WordPress SQL Injection Attacks

      May 16, 2025

      Microsoft has closed its “Experience Center” store in Sydney, Australia — as it ramps up a continued digital growth campaign

      May 16, 2025

      Bing Search APIs to be “decommissioned completely” as Microsoft urges developers to use its Azure agentic AI alternative

      May 16, 2025

      Microsoft might kill the Surface Laptop Studio as production is quietly halted

      May 16, 2025

      Minecraft licensing robbed us of this controversial NFL schedule release video

      May 16, 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

      The power of generators

      May 16, 2025
      Recent

      The power of generators

      May 16, 2025

      Simplify Factory Associations with Laravel’s UseFactory Attribute

      May 16, 2025

      This Week in Laravel: React Native, PhpStorm Junie, and more

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

      Microsoft has closed its “Experience Center” store in Sydney, Australia — as it ramps up a continued digital growth campaign

      May 16, 2025
      Recent

      Microsoft has closed its “Experience Center” store in Sydney, Australia — as it ramps up a continued digital growth campaign

      May 16, 2025

      Bing Search APIs to be “decommissioned completely” as Microsoft urges developers to use its Azure agentic AI alternative

      May 16, 2025

      Microsoft might kill the Surface Laptop Studio as production is quietly halted

      May 16, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»Is it a good design to use a single Webdriver instance in Base Class and then each Page Object class inherits the driver instance in Cucumber Steps?

    Is it a good design to use a single Webdriver instance in Base Class and then each Page Object class inherits the driver instance in Cucumber Steps?

    May 12, 2024

    Im using Cucumber BDD framework with Selenium+Java. Now, I have made on BaseClass.Java in which i declare on public static WebDriver driver;

    Now, in my .feature file i have many scenarios and in each scenario’s steps: Given, when, then – i need to initialize the PageFactory.initElements(driver, class) again as if i dont do, then i get nullpointer expection.

    Now, instead of creating object of each PageObject class and then passing main driver instance in it’s constructor, im extending all PO classes and STep definition class the BaseClass.java. Now, these directly have the driver instance inherited.

    There is no need to create object of any class and its working fine as only 1 driver session is maintained throughout my test.

    So, none of my class has its own local WebDriver driver; instance as its using the driver , that it inherited by default from the base class.

    Is it ok to use such design pattern?

    Source: Read More

    Hostinger
    Facebook Twitter Reddit Email Copy Link
    Previous ArticleJMeter: Writing to CSV causes an extra blank line to be written, but only sometimes
    Next Article QoQ and QServe: A New Frontier in Model Quantization Transforming Large Language Model Deployment

    Related Posts

    Common Vulnerabilities and Exposures (CVEs)

    CVE-2025-4807 – SourceCodester Online Student Clearance System Directory Traversal Information Disclosure

    May 16, 2025
    Common Vulnerabilities and Exposures (CVEs)

    CVE-2025-4808 – PHPGurukul Park Ticketing Management System SQL Injection Vulnerability

    May 16, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    Microsoft: April updates cause Windows Server auth issues

    Security

    Beyond Chatbots: Why Conversational AI is the Future of Business?

    Development

    Build knowledge-powered conversational applications using LlamaIndex and Llama 2-Chat

    Development

    CVE-2025-4507 – Campcodes Online Food Ordering System SQL Injection Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Highlights

    Development

    AWS empowers sales teams using generative AI solution built on Amazon Bedrock

    August 29, 2024

    At AWS, we are transforming our seller and customer journeys by using generative artificial intelligence…

    CVE-2025-4290 – PCMan FTP Server Buffer Overflow Vulnerability

    May 5, 2025

    Mcdavid Draisaitl ’24 Let’s Go Oilers T Shirt

    November 14, 2024

    AI Thumbnails Are Ruining Fortnite Discovery, But Epic Doesn’t Care

    May 1, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

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