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»How to continue script when element is not found in selenium

    How to continue script when element is not found in selenium

    December 23, 2024

    I am using selenium web driver and appium as this is mobile application automation,

    I am trying to check that if element is there or not and based on that I have put conditions.

     long starttime = System.currentTimeMillis();
     long endtime = starttime + 60*1000; // 60 seconds * 1000 ms/sec;
    
    
    while(System.currentTimeMillis() < endtime)
    {
    
        notcount = driver.findElement(By.id(AppConstants.notificationcount));
    
    }
    
    if(notcount.equals(null))
    
    {
    
        System.out.println("No Element found");
    }
    else
    {
    
        //SOME ANOTHER STEPS
    }
    

    Here issue is when element is not there , instead to redirect to ELSE part , selenium stops execution and throwing exception.

    I do not want to use List -findelements here as that is taking long time to find element.

    Source: Read More

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleHow Acceptance Test-Driven Development (ATDD) Drives Business Value and Growth 
    Next Article Using transcription confidence scores to improve slot filling in Amazon Lex

    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

    LLMs Can Learn Complex Math from Just One Example: Researchers from University of Washington, Microsoft, and USC Unlock the Power of 1-Shot Reinforcement Learning with Verifiable Reward

    Machine Learning

    Min Woo Lee Lululemon Let Him Cook Shirt

    Web Development

    CVE-2025-32974 – XWiki Cross-Site Scripting (XSS) and Privilege Escalation Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Universal Design Principles Supporting Operable Content – Flexibility in Use

    Development

    Highlights

    News & Updates

    Can a browser reduce stress and help you focus? Opera hopes its “mindful browser” can convince you to leave Google Chrome.

    February 4, 2025

    Opera Air is a new web browser designed around mindfulness. The app includes several features…

    4 Open-Source Alternatives to OpenAI’s $200/Month Deep Research AI Agent

    February 6, 2025

    Gemini 2.0 is now available to everyone

    February 5, 2025

    Reimagining software development with the Amazon Q Developer Agent

    June 11, 2024
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

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