Q:

Selenium inconsistent in finding login fields in iframe

I am webscraping stats from https://game-rainbow6.ubi.com/en-us/uplay/player-statistics/dbd1cef3-d69d-4296-a235-ae8d7d70363f/multiplayer.  And I am using Selenium and python to log in and scrape the stats I want.  The login process all happens in a class called player
The webdriver needs to find two fields "AuthEmail" and "AuthPassword".  My problem is that sometimes it finds the fields and logs in properly but other times throws the error that it can not find the fields.  I have tired an implicit wait thinking it needed the ifram to load fully, but I still get the error sometimes.  I also tried an explicit wait with: 
WebDriverWait(self.driver, 10).until(EC.presence_of_element_located((By. ID, "AuthEmail"))

but I get the error that my:
__init__ function takes 2 args and I gave it 3

Code trials:
def __init__(self, player_name):
    self.driver = webdriver. Chrome()
    self.player_stats = {}
def login(self):

        #login pop up is in a different IFrame, switch to it
    iframe = self.driver.find_element_by_tag_name('iframe')
    self.driver.switch_to.frame(iframe)

    login_email = self.driver.find_element_by_id('AuthEmail')
    login_email.send_keys('')
    login_pwd = self.driver.find_element_by_id('AuthPassword')
    login_pwd.send_keys('')
    submit_button = self.driver.find_element_by_id('LogInButton')
    submit_button.click()

    #Switch driver back to main webpage for webscraping
    self.driver.switch_to.default_content()

A:

The desired elements are within an <iframe> so you have to:

Induce WebDriverWait for the desired frame to be available and switch to it. 
Induce WebDriverWait for the desired element to be clickable. 
You can use the following solution:
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC

options = Options()
options.add_argument("start-maximized")
options.add_argument("disable-infobars")
options.add_argument("--disable-extensions")
driver = webdriver. Chrome(chrome_options=options, executable_path=r'C:\Utility\BrowserDrivers\chromedriver.exe')
driver.get("https://game-rainbow6.ubi.com/en-us/uplay/player-statistics/dbd1cef3-d69d-4296-a235-ae8d7d70363f/multiplayer")
WebDriverWait(driver, 10).until(EC.frame_to_be_available_and_switch_to_it((By. CSS_SELECTOR,"iframe.ng-scope.ng-isolate-scope.rs-template-uplay-connect")))
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By. CSS_SELECTOR, "input.form-control#AuthEmail"))).send_keys("DMatza")
driver.find_element_by_css_selector("input.form-control#AuthPassword").send_keys("DMatza")

Browser Snapshot:

