I want to click on next arrow of a carousel till the end of loop. now how do i click constantly on the next arrow using selenium webdriver ?? I did for-loop in the click but its not working. This is the basic code for the element and click.
element = driver.findElement(By.xpath(".//*[@id='hp_category_tab_electronics_0-content']/div[1]/div/div/a[2]"));
element.click();
so in short i want to click on next arrow button for like 5 times before the end of products is encountered.
I found the code actually i was not using
thread.sleep();
before.