I need to check whether an element is expanded or not (issue both have same properties)

In SAP application, I need to check whether a branch is expanded or not. If it is minimized i need to expand it and if its already expanded not to do anything there. “network time” branch.
Problem here is : the selector for both “+” element and “-” element are same.