cdp.is_element_present seems to be slow with large number of elements #3929
              
                
                  
                  
                    Answered
                  
                  by
                    mdmintz
                  
              
          
                  
                    
                      LeeMeng2020
                    
                  
                
                  asked this question in
                Q&A
              
            -
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            mdmintz
          
      
      
        Aug 17, 2025 
      
    
    Replies: 1 comment 1 reply
-
| Using the  | 
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            
      Answer selected by
        mdmintz
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Using the
'TAG:contains("TEXT")'selector is not efficient, as it's not a real CSS Selector. It has to go through every element with that tag, and then find the text to see if it's a match. If you need the speed, you'll have to use a standard CSS Selector.