how to loop list of webelements using java and selenium web driver? -



how to loop list of webelements using java and selenium web driver? -

hii can 1 tell me how loop list of web elements using java , selenium web driver here code

these objects

projectsummaryreport_campaign = by.name("q.a.62.d"); projectsummaryreport_projecttitle = by.name("q.a.1.d"); projectsummaryreport_projectallocation = by.name("q.a.63.d"); projectsummaryreport_jobnumber = by.name("q.a.2.d"); projectsummaryreport_archivalstatus = by.name("q.a.6.d"); projectsummaryreport_startdate = by.name("q.a.7.d"); projectsummaryreport_enddate = by.name("q.a.8.d");

this code

wrappers.click(projectsummaryreport_campaign); wrappers.click(projectsummaryreport_projecttitle); wrappers.click(projectsummaryreport_projectallocation); wrappers.click(projectsummaryreport_jobnumber); wrappers.click(projectsummaryreport_archivalstatus); wrappers.click(projectsummaryreport_startdate); wrappers.click(projectsummaryreport_enddate);

click_link method

public static void click(by byobj) { _driver.findelement(byobj).click(); }

please dont mined if thing wrong new selenium automation advance solutions

you meant smthing this?

list<webelement> list = arrays.aslist(webelement, webelement1, webelement2...); for(webelement el : list){ el.click(); }

java selenium

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -