а

Id and other attribute to the tree's html elements


#1

I need to add an id –attribute (or ‘rel’ -attribute) to the tree’s html elements. Id’s are needed for the Selenium test purposes. How I’m able to add ids? Functions ‘set_id’, set_userdata, and set_attribute sounds like a solution, but those values doesn’t flow into the html element as attributes as I expected.
I would be much appreciated if there any solution for this?


#2

Unfortunately such feature is not available.


#3

By the way, selenium can use Xpath or css locators, so it possible to located the elements without assigning some fixed IDs to them.


#4

We have a quite large and partly old system, so xpath and css selectors slows down selenium and makes test a little tricky to write. IDs’ would make writing a new tests lots of easier.