I have just encountered a question about handling hidden elements in Selenium. I don't understand how they should be handled. I'm also confused about why hidden elements would be used.
How do I handle hidden elements in Selenium? I'm particularly concerned with handling hidden elements that have the same or almost the same identifiers as a visible element.
Original text
Today was the first time I was asked about hidden elements in Selenium and I never had to deal with them in practice. I watched a video tutorial on that and I now get the general idea. To follow up on that video I would like to ask, why hidden elements exist to begin with, is it flawed design?
Secondly, is it true that they can pose a challenge only if there is an identical visible element present and even in this case you don't have to resort to identifying non-hidden elements by their coordinates not being equal to 0, you just need to carefully inspect it because hidden elements are unlikely to have all identifiers identical to another visible element?