This thesis is devoted to the computation and analysis of electromagnetic wave scattering problems, with particular applications in accurate simulation of invisibility cloaks arisen from the field of transformation electromagnetics (TE). An efficient spectral-element method (SEM) is proposed for solving general two-dimensional Helmholtz equations in anisotropic media. In practice, we adopt a transparent boundary condition (TBC) characterized by the Dirichletto-Neumann (DtN) map to reduce wave propagation in an unbounded domain to a bounded domain. We then introduce a semi-analytic technique to integrate the global TBC with local curvilinear elements seamlessly, which is accomplished by using a novel elemental mapping and analytic formulas for evaluating global Fourier coefficients on spectral-element grids exactly. From the perspective of TE, an invisibility cloak is devised by a singular coordinate transformation of Maxwell's equations that leads to anisotropic materials coating the cloaked region to render any object inside invisible to observers outside. An important issue resides in the imposition of appropriate boundary conditions, i.e., cloaking boundary conditions (CBCs), in order to achieve perfect invisibility. Based upon the principle that a well-behaved electromagnetic field in the original space must be well-behaved in the transformed space as well, we propose new CBCs for circular, elliptic and polygonal invisibility cloaks from the essential "pole" conditions related to singular transformations. We emphasize that our proposal of CBCs is different from any existing ones.