…below is the XPATH and script but will not work consistently as the generated HTML id or class/css are always random (but the text is always the same at this location):
Element Should Contain //*[@id="random_id_123"]/div/table/tbody/tr[1]/td[3] mytext
Just some questions I would ask … Is there some sort of stable page structure before //*[@id="random_id_123"]? Is there any other tables within the page?
Hi. There are no other tables on this page and this is the same situation for all HTML other than tables where the id and css class now change every time the app loads a page. I wonder if this is a limitation of Robot Famework to work with an SPA built with Angular.
It’s all HTML markup at the end of the day. The underlying markup generator implementation does not really matter. It could be Angular, React, Vue…
If you are dealing with a very dynamic web application, Robot Framework Browser could be interesting. It can automatically wait for elements to appear, etc. Less code to write compared to SeleniumLibrary in many cases.