from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
import time
driver=webdriver.Firefox()
driver.get("https://www.126.com/") #126邮箱登陆测试
time.sleep(4)
driver.switch_to_frame("x-URS-iframe")
e=driver.find_element_by_xpath("//input[@name='email']")
e.clear()
e.send_keys("********")
driver.find_element_by_xpath("//input[@name='password']").send_keys('*****')
driver.find_element_by_id("dologin").click()
time.sleep(3)
#fa=driver.find_element_by_class_name('cnt')
#print(fa.id)
#driver.switch_to_default_content() #切出
#e2=driver.find_element_by_id("normalLoginTab")<