Selection of selector attributes for data scraping

Hey everyone,

Which attributes are the most ‘stable’ to select when working on a web browser? I have read the documentation and would also like to learn from your experiences.

For example, I am using data scraping on a table and the selectors are like the following.


which ones make the most sense to include and why?

Thank you for the assist.

@berkaykor

  1. Generally tags dont change
  2. Css selector might not be reliable because if new button cones then it would change
  3. Id can be reliable depending on it containing any numbers or only names
  4. Class might help some times…again depends because in ltest sites classes are used to style the pages or buttons and few classes might change
  5. Innertext can be reliable when you have buttons or something which are static

Hope this helps

Cheers