java - I can't find the Web Element oh the page -


i'm trying find web element "grupo de parâmetros" when use selenium ide locate xpath:idrelative //div[@id='menu']/ul/li[6]/ul/li[4]/ul/li/ul/li[2]/a/span or xpath:postion //li[6]/ul/li[4]/ul/li/ul/li[2]/a/span not occur . i'm using eclipse/java.

this code of page

<li class="ui-menuitem ui-widget ui-corner-all ui-menuitem-active" role="menuitem">     <a class="ui-menuitem-link ui-corner-all ui-state-hover" onclick="primefaces.ab({source:'menu',global:false,params: [{name:'menu_menuid',value:'5_3_0_1'}],formid:'j_idt8'});return false;" href="#" title="" tabindex="-1">         <span class="ui-menuitem-text">**grupo de par&#xe2;metros**</span>     </a> </li> 

and automatized test

driver.get(...);  driver.findelement(by.xpath("//div[@id='menu']/ul/li[6]/ul/li[4]/ul/li/ul/li[2]/a/span"));       driver.findelement(by.id("paramgroupalias")).clear();     driver.findelement(by.id("paramgroupalias")).sendkeys("box");      driver.findelement(by.id("pesquisar")).click();      webelement retorno = driver.findelement(by.id("j_idt64_data"));     system.out.println(" retorno "+ retorno.gettext() ); 

i tried couldn't make selenium ide when exported programmed in java proyect jquery. think this:

#ui-menuitem ui-widget ui-corner-all ui-menuitem-active > > span  

where reference class of first element of page , descend "levels" in page.

but made reference object wanted refer this:

#ui-menuitem-text 

i used in java project , worked tried 3 'divs' 1 inside others. anyway, think work you.

please let me know if works.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -