当js对输入内容是通过自定义事件进行处理的,而自定义事件是通过文本框的获取失去焦点触发的,这时当用selenium rc模拟type输入操作时需先进行focus操作,用js操作的代码为
runScript("window.document.getElementsByClassName('shortinput')[0].value=11111111;window.document.getElementsByClassName('shortinput')[0].focus();window.document.getElementsByClassName('shortinput')[0].blur()")