通过单击按钮,它应该调用另一个类来填充某些字段,但它不起作用。
我正在使用mouseOver,mouseDown,mouseUp,mouseOut等方法测试按钮,然后它们正常工作。
代码:
public class PopupMatricula extends BABasicFormWrapper{
public void selecionarMatricula(String idBotao, IComandoTeste comando) throws Exception{
//clica para invocar popup
click(idBotao);
selenium.waitForPopUp("_blank", "30000");
selenium.selectWindow("_blank");
SeleniumUtil.getInstance().aumentarJanela();
selenium.selectWindow("_blank");
if(selenium.isElementPresent("//div[contains(@id, 'ac_btn_toggler_bemimovel_r_popup')]//input[contains(@src, 'abToggleShow.gif')]")){
click(getBotaoToggle());
}
click("//input[contains(@src, 'cmdpesquisar.gif')]");
selenium.mouseOver("//div[contains(@id, 'ac_grd_bemimovel_r_popup')]//table//tbody/tr["+pesquisaGrid("ac_grd_bemimovel_r_popup", comando)+ "]//td/input[contains(@src, 'gridselecionar.gif')]");
aguardarAjax();
aguardar();
selenium.mouseDown("//div[contains(@id, 'ac_grd_bemimovel_r_popup')]//table//tbody/tr["+pesquisaGrid("ac_grd_bemimovel_r_popup", comando)+ "]//td/input[contains(@src, 'gridselecionar_over.gif')]");
aguardarAjax();
aguardar();
selenium.mouseUp("//div[contains(@id, 'ac_grd_bemimovel_r_popup')]//table//tbody/tr["+pesquisaGrid("ac_grd_bemimovel_r_popup", comando)+ "]//td/input[contains(@src, 'gridselecionar_over.gif')]");
// selenium.mouseOut("//div[contains(@id, 'ac_grd_bemimovel_r_popup')]//table//tbody/tr["+pesquisaGrid("ac_grd_bemimovel_r_popup", comando)+ "]//td/input[contains(@src, 'gridselecionar_over.gif')]");
aguardarAjax();
Thread.sleep(1500);
new Portal2Helper().selecionarJanelaPrincipal();
}
我赞成帮助。