List<WebElement> elements = driver.findElements(By.className("Submit-button-icon"));
Thread.sleep(1000);
WebElement button=elements.get(0);
button.click();
I need to click second element using "elements" array
I used this:
WebElement button1=elements.get(1);
button1.click();
But this is not working.Please help
--
You received this message because you are subscribed to a topic in the Google Groups "webdriver" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/webdriver/QX4YRV-Fzjc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to webdriver+unsubscribe@googlegroups.com.
To post to this group, send email to webd...@googlegroups.com.
Visit this group at http://groups.google.com/group/webdriver.
For more options, visit https://groups.google.com/d/optout.