What are you getAttribute and getText?
You can pass the attribute in the form of a parameter to any method. The getText() method would return the text which is present in between both the start and end HTML tags. The CSS might not hide it. The getAttribute() method can identify the key-value pairs present within any HTML tags.