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

      Sunshine And March Vibes (2025 Wallpapers Edition)

      May 17, 2025

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

      May 17, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      May 17, 2025

      How To Prevent WordPress SQL Injection Attacks

      May 17, 2025

      Microsoft’s allegiance isn’t to OpenAI’s pricey models — Satya Nadella’s focus is selling any AI customers want for maximum profits

      May 17, 2025

      If you think you can do better than Xbox or PlayStation in the Console Wars, you may just want to try out this card game

      May 17, 2025

      Surviving a 10 year stint in dev hell, this retro-styled hack n’ slash has finally arrived on Xbox

      May 17, 2025

      Save $400 on the best Samsung TVs, laptops, tablets, and more when you sign up for Verizon 5G Home or Home Internet

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

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

      May 17, 2025
      Recent

      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

      Apps in Generative AI – Transforming the Digital Experience

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

      Microsoft’s allegiance isn’t to OpenAI’s pricey models — Satya Nadella’s focus is selling any AI customers want for maximum profits

      May 17, 2025
      Recent

      Microsoft’s allegiance isn’t to OpenAI’s pricey models — Satya Nadella’s focus is selling any AI customers want for maximum profits

      May 17, 2025

      If you think you can do better than Xbox or PlayStation in the Console Wars, you may just want to try out this card game

      May 17, 2025

      Surviving a 10 year stint in dev hell, this retro-styled hack n’ slash has finally arrived on Xbox

      May 17, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»Jeremy’s Larabits: Popping Over with Popovers

    Jeremy’s Larabits: Popping Over with Popovers

    June 24, 2024

    We use popovers for so many features in our applications. Toasts, search boxes, and notifications are just…

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleDataStax releases a number of updates to better facilitate RAG implementation
    Next Article Setting up B2B commerce with Shopify

    Related Posts

    Development

    February 2025 Baseline monthly digest

    May 17, 2025
    Development

    Learn A1 Level Spanish

    May 17, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    Pentera’s 2024 Report Reveals Hundreds of Security Events per Week, Highlighting the Criticality of Continuous Validation

    Development

    The Death of Product Development as We Know it

    Web Development

    Il podcast di Marco’s Box – Puntata 198 (con video!)

    Development

    UK Trails Behind Europe in Technical Skills Proficiency, Coursera Report Finds

    Development

    Highlights

    How to repeat the same test with Selenium Webdriver without opening a new browser instance each time?

    May 15, 2024

    I am using Selenium Webdriver on Node.js with Cucumber.js.
    I want to run the same test on multiple pages. In this case just checking for 404s in my footer.
    My Cucumber .feature file looks like:
    Feature: Check footer links

    Scenario: Check for broken links in the footer section
    Given I am checking the footer on the ‘<page>’ page
    Then there should be no broken links in the footer on ‘<page>’ page

    Examples:
    | page |
    | about-us |
    | contact-us |
    | products |

    And in my steps.js file I have:
    const { When, Then, Given, AfterAll } = require(‘@cucumber/cucumber’);
    const assert = require(‘assert’);
    const { Builder, By, until, Key, http } = require(‘selenium-webdriver’);
    const firefox = require(‘selenium-webdriver/firefox’);
    const XMLHttpRequest = require(‘xhr2’);
    var {setDefaultTimeout} = require(‘@cucumber/cucumber’);
    setDefaultTimeout(60 * 1000);

    Given(‘I am checking the footers on the {string} page’, async function (string) {
    this.driver = new Builder()
    .forBrowser(‘firefox’)
    .build();

    this.driver.wait(until.elementLocated(By.className(‘logo-image’)));

    await this.driver.get(‘https://www.some-site.com/’ + string);
    });

    Then(‘there should be no broken links in the footer on {string} page’, async function(string) {
    var urlArr = [];
    var footerLinks = await this.driver.findElements(By.css(‘.footer a’));
    for (let i = 0; i < footerLinks.length; i++) {
    var url = await footerLinks[i].getAttribute(“href”);
    urlArr.push(url);
    }

    if (urlArr.length < 1) {
    console.log(`Could not find any footer links on ${string} page`);
    }
    else {
    for (let i = 0; i < urlArr.length; i++) {
    var respStatus = await checkLink(urlArr[i]);
    assert.ok(respStatus==200);
    }
    }
    });

    function checkLink(url) {
    //Check link function returns status code….
    }

    This works fine, but for one thing: For each page that is tested a new instance of FireFox opens up.
    I tried adding
    After(async function() {
    this.driver.quit();
    });

    To the end but this closes the session completely and the other tests fail after the first initial one is done.
    Would anyone know how I could repeat the tests in the same browser instance?

    How To Interpret Data From Google’s Chrome UX Report

    January 11, 2025

    10 Things I Learned as an Engineering Manager Using Dev Mode

    August 23, 2024

    This fitness band features a ChatGPT-like fitness coach, and Amazon’s bundle deal on it is $50 off

    March 24, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

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