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

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -