How to select all materials for switching

For example i will going to switch Roof from Gable Roof to flat roof when i select on the object i need to click surface to surface of the object. Is there a way to select all the surface/ material of the said roof

thank you