how to select all hidden or visible elements from a list elements using Python
I believe that if you toggle “Show Hidden Elements” and run your code it will output all elements including hidden ones. You can add to your code after collecting your elements a part that separates your hidden elements and visible elements using the IsHidden property. In the link I posted above there is a code that shows how to use the IsHidden property, and there is a package called Element.IsHidden with a custom node (it is a bit old so I am not 100% sure it is still functional but it should be) You can look at the code inside that node to see how the hidden and visible elements are separated into two lists. Hope this helps!