BaseCase object has no attribute 'switch_to' #3799
              
                
                  
                  
                    Answered
                  
                  by
                    mdmintz
                  
              
          
                  
                    
                      TripleJJones
                    
                  
                
                  asked this question in
                Q&A
              
            -
| Not sure why I'm getting this error when using RecaptchaSolver. Based on the docs, SB has multiple instances of switch to. For example: self.switch_to_default_content(). I thought SB incorporated all of the methods from selenium? from seleniumbase import SB
from RecaptchaSolver import RecaptchaSolver
with SB(uc=False, incognito=False, headless=False) as sb:
    sb.open("https://www.google.com/recaptcha/api2/demo")
    solver = RecaptchaSolver(sb)
    solver.solveCaptcha() 
    sb.sleep(5)
    exit | 
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            mdmintz
          
      
      
        Jun 7, 2025 
      
    
    Replies: 1 comment 1 reply
-
| There's no such  self.switch_to_frame(frame="iframe", timeout=None)
self.switch_to_frame_of_element(selector, by="css selector")
self.switch_to_default_content()
self.switch_to_parent_frame()
self.switch_to_window(window, timeout=None)
self.switch_to_tab(tab, timeout=None)
self.switch_to_default_window()
self.switch_to_default_tab()
self.switch_to_newest_window()
self.switch_to_newest_tab()
self.switch_to_driver(driver)
self.switch_to_default_driver()
self.switch_to_alert(timeout=None)
 | 
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
  
        
    
There's no such
sb.switch_to()method inSeleniumBase, but you're probably looking for one of these:RecaptchaSolveris an external tool, but it probably expects ansb.driverobject instead ofsb. The APIs are different.