---
title: "FireEvent(&quot;onfocus&quot;)方法 "
author: "bd2007"
date: "2011-08-25T16:52:53Z"
tags: []
categories: ["非技术"]
slug: "fireevent-quot-onfocus-quot"
draft: false
lastmod: "2011-08-25T16:52:53Z"
id: 1158043
url: "https://bd2007.iteye.com/blog/1158043"
---

“焦点在什么状态下点击enter”，所以先要用fireevent("onfocus")方法触发获得焦点的事件。


browser("管理平台").window("字典帮助 -- 网页对话框").page("字典帮助").webedit("sel_codename").fireevent("onfocus")


set wshshell =createobject("wscript.shell")


wshshell.sendkeys "{enter}"


反思：初时录制不上，于是开始四处抱怨说录制不上，但是没有静心想一下，

为什么录制不上？

录制出来的代码比实际操作少了哪一步？


其实一直知道是没有把回车这一步录制上，但是却没有积极去网上搜索相关的解决办法。一直拖着，自己不去解决，难道还等着别人去给你想解决办法？！

工作中真正需要的是 解决问题的能力，当遇到问题时，应该怎么分析。