driver.switch_to.frame(' xxx')
driver.execute_script('window.scrollBy(200,0)') # window.scrollBy(x,y)
#切换webdriver到新的目标窗口
for handle in driver.window_handles:
driver.switch_to.window(handle)
#判断是否进行了目标窗口
title=driver.title
if 'xxxxx' in title:
break
element=driver.find_element_by_css_selector('#meiqia-container iframe[name=chat]')
driver.execute_script('$(arguments[0]).remove()',element) #将element传给了arguments[0]
time.sleep(2)
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) | Powered by Discuz! X3.2 |