I have seen this question, but it is not exactly what i need.
I am trying to automate 2048 using Selenium. As you start to play, the class of elements changes. The Tiles which has the value have 3, or 4 different classes with below patterns:
tile tile-1024 tile-position-1-2
tile tile-2 tile-position-4-1 tile-new
tile tile-8 tile-position-1-4 tile-merged
I am wondering how can i find all the elements which has this pattern in their class:
tile tile-[TEIL SCORE] tile-position-[Any Number]-[Any Number]
Here is my my HTML. Sorry for image, the chrome console does not allow me to copy it without expanding it:
