Starting automation at my job and currently the way I've been doing it by xpath and button description. There are only classes, no id's, and right now dev is re-doing the UI. Therefore, css selectors will probably not be reliable. However, going off the button description doesn't seem reliable either.
Is there a way to create an xpath or find an element using the client side JS? Everything is written in Java and I'm using selenium.
I was trying to do something to this effect:
Is that possible or is there a better way than using the button description?
For example, this is what I'm dealing with:
div class="yui3-u nav-button"> div class="yui3-u-1 nav-content"> div class="yui3-u img-holder"></div> div class="yui3-u nav-text"> Reports </div> </div> </div>