code: def is_webdriver_mobile(webdriver):
          
          browser = webdriver.capabilities['browserName']
  
          if (browser == u('iPhone') or 
              browser == u('android')):
              return True
          else:
              return False
docs: Check if a web driver if mobile.
  
          Args:
              webdriver (WebDriver): Selenium webdriver.