javascript - How can create loop for below function -


Here webdriver should click on each element, but the action is the same, can you help me in javascript New!

  Public Zero ClickOffAffitters () {driver.findElement (by.cssSelector ("div.scroll-item.all")). Click (); . Click on Driver.findElement (By.cssSelector ("div.scroll-item.news")) (); . Click on Driver.findElement (By.cssSelector ("div.scroll-item.results")) (); . Click on Driver.findElement (By.cssSelector ("div.scroll-item.schedules")) (); . Click on Driver.findElement (By.cssSelector ("div.scroll-item.images")) (); . Click on Driver.findElement (By.cssSelector ("div.scroll-item.video")) (); . Click on Driver.findElement (By.cssSelector ("div.scroll-item.comment")) (); . Click on Driver.findElement (By.cssSelector ("div.scroll-item.activity")) (); }  

clickonfilter ("div.scroll-item.activity", "div.scroll -item.activity "); // You can add more, or just send an array of stars Public Zero clickOnAllFilters (String ... Filters) {for (String Filter: Filters) {driver.findElement (by.cssSelector (filter)). Click (); }}

Comments

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -