Comprehensive studies in geophysics and seismology have dealt with scattering phenomena in unbounded elastic domains containing fractures or cavities. Other studies have been carried out to investigate scattering by discontinuities located near a free surface. In this last case, the presence of fractures and cavities significantly affects wave motion and, in some cases, large resonant peaks may appear. To study these resonant peaks and describe how they can be affected by the presence of other near-free-surface fractures or cavities we propose the use of the indirect boundary element method to simulate 2D scattering of elastic P and SV waves. The geometries considered are planar and elliptic cracks and cavities. This method establishes a system of integral equations that allows us to compute the diffracted displacement and traction fields. We present our results in both frequency and time domains. In the planar cracks located near the free surface, we validate the method by comparing results with those of a previously published study. We develop several examples of various fractures and cavities to show resonance effects and total scattered displacement fields, where one can observe conspicuous peaks in the frequency domain and important wave interactions in the time domain. Finally, we show how our dimensionless graphs can be used to deal with materials like clay, sand, or gravel and compare the response with finite-element analysis of elastic beams.