如何从生成的自动完成列表中选择第一个元素?

时间:2012-05-31 07:49:29

标签: java eclipse google-chrome selenium-rc

代码是 -

selenium.click("id=j_idt743:j_idt2340:lnkpgPtMHXProblemShowAdd");
selenium.focus("id=j_idt743:j_idt2340:txtPtMHXProblemPastMedicalHistoryName"); 
selenium.type("id=j_idt743:j_idt2340:txtPtMHXProblemPastMedicalHistoryName",s1);
selenium.typeKeys("id=j_idt743:j_idt2340:txtPtMHXProblemPastMedicalHistoryName",s1);
selenium.keyDown("id=j_idt743:j_idt2340:txtPtMHXProblemPastMedicalHistoryName","\40");
selenium.keyDown("id=j_idt743:j_idt2340:txtPtMHXProblemPastMedicalHistoryName","\13"); 

keyevents无效.......

0 个答案:

没有答案