from selenium import webdriver
driver=webdriver.Chrome()
file_path=r"D:PychramProjectslyttestTestFrame.html"
driver.get(file_path)
driver.switch_to.frame('search')#定位到iframe控件
driver.find_element_by_id('query').send_keys('selenium')
driver.find_element_by_id('stb').click()
sleep(3)
driver.quit()