The response of solids to electromagnetic fields is of crucial importance in many areas of science and technology. Many fundamental questions remain to be answered about the dynamics of the photoexcited electrons that underpin this response, which can evolve on timescales of tens to hundreds of attoseconds. How, for example, is the photoexcited electron affected by the periodic potential as it travels in the solid, and how do the other electrons respond in these strongly correlated systems? Furthermore, control of electronic motion in solids with attosecond precision would pave the way for the development of ultrafast optoelectronics. Attosecond electron dynamics can be traced using streaking, a technique where a strong near-infrared laser field accelerates an attosecond electron wavepacket photoemitted by an extreme ultraviolet light pulse, imprinting timing information onto it. We present attosecond streaking measurements on the wide-bandgap semiconductor tungsten trioxide, and on gold, a metal used in many nanoplasmonic devices. Information about electronic motion in the solid is encoded on the temporal properties of the photoemitted electron wavepackets, which are consistent with a spread of electron transport times to the surface following photoexcitation.