Is there an automation method, via Selenium with Java, that can verify if a carousel rotates after clicking it?

I highlighted the Right arrow as Red box which should rotate after clicking it.

enter image description here

  • Are these three different images or one single image? And does the next screen has the same number of images. It would be good if you give an HTML snippet of this. Sep 9, 2015 at 3:49
  • Possible duplicate of sqa.stackexchange.com/questions/10287/… Sep 9, 2015 at 3:51
  • @log_file They are three different images. And when you click on the arrows it might have different images depending if there are more cars to rotate.
    – Robben
    Sep 9, 2015 at 14:21
  • What does the HTML look like for the images? if the text is separate from the image you can verify that the text has changed after clicking on the arrow. For instance: if the number goes from 33155 to 33154 you can check to see if that element is on the page.
    – DEnumber50
    Sep 9, 2015 at 15:12
  • @DEnumber50 Hm, that might be a good idea, ty. And the development work is not complete yet. I was just doing pre-work to see if there is an easy way to do it.
    – Robben
    Sep 9, 2015 at 15:15

2 Answers 2


I've written an article about the same topic, with examples in Java


Hope that helps.


I would verify that when the element is clicked, that the other elements change. So specifically look at the text that is being changed on the page. Something like this would work for a verification:

Assert.IsTrue(driver.PageSource.Contains("*Expected text*"))

Note that this is C# code that I use for some quick validations, and something with more complexity can also be written.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.