Noob troubleshooting sb.click(selector) #2817
              
                
                  
                  
                    Answered
                  
                  by
                    mdmintz
                  
              
          
                  
                    
                      davidjivan
                    
                  
                
                  asked this question in
                Q&A
              
            -
| Hi team... can anyone offer ideas how to troubleshoot this? seleniumbase.common.exceptions.NoSuchElementException: Message: I am pretty sure I'm using xpath correctly. When I run sb.assert_text('I Accept') it asserts the text. The element is a "I Accept" Any ideas appreciated! | 
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            mdmintz
          
      
      
        Jun 1, 2024 
      
    
    Replies: 1 comment 1 reply
-
| If it's an alert, use  | 
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
  
        
    
If it's an alert, use
sb.accept_alert(). Otherwise, you either have an incorrect selector (use a valid one), or the button is in an iframe (in which case, switch into the iframe first).