51Testing软件测试论坛

标题: selenium运营异常报错,咋回事? [打印本页]

作者: 测试积点老人    时间: 2022-1-11 10:42
标题: selenium运营异常报错,咋回事?
如题,详细代码如下:
运行代码:
  1. from selenium import webdriver
  2. from selenium.webdriver import ActionChains
  3. driver=webdriver.Ie()
  4. driver.get("http://10.3.231.64:7001/pension_sec/")
  5. driver.switch_to.frame('fraInterface')
  6. driver.implicitly_wait(10)
  7. user=driver.find_element_by_id("UserCode2")
  8. ActionChains(driver).click_and_hold(user).send_keys_to_element(user,"001").perform()
  9. -----
复制代码
运行异常结果:
  1. Message: Currently focused window has been closed.
复制代码
求教!

作者: yb389973788    时间: 2022-1-12 09:44
应该是fraInterface这个界面关闭了啊
作者: qqq911    时间: 2022-1-12 10:34
聚焦的窗口被关闭了
作者: jingzizx    时间: 2022-1-12 17:31
窗口关闭




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2