How can the limited to infrared James Webb space telescope do spectroscopy of the exoplanets' atmosphere without seeing in the visible spectrum? 
image source: https://www.youtube.com/watch?v=bI-JIAmiL7A
JWST will look for the composition of exoplanets' atmosphere using the spectroscopy method. However as far as I know for elements of the periodic table to make the spectrograph you need to collect white light in the visible spectrum.
How will this be achieved in the JWST despite the fact that it is limited to operate only in the infrared band?
How we will be able to correctly identify using a spectrograph, an element of the periodic table if it contains lines in the visible spectrum with the JWST collecting light only in the infrared spectrum?
 A: 
However as far as I know for elements of the periodic table to make the spectrograph you need to collect white light in the visible spectrum.

The infrared spectrum is in fact rich in absorption and emission features that are diagnostic of various chemical elements. As an example of the richness of the near IR spectrum and how it can be used to obtain the chemical abundances of stars you could look at Jonsson et al. (2020), describing the analysis of near-IR spectra from the APOGEE programme. This programme attempts to determine abundances for 24 chemical elements (including C, N, O, Mg, Na, K, Si, Ca Fe etc.) in hundreds of thousands of spectra.
Crucially though for exoplanet investigations, IR spectra also contain the signatures of many molecules (water, methane, ammonia and various oxides and silicates) that are very likely to be present in cooler exoplanetary atmospheres and are much more prominent in the IR than in the visible part of the spectrum.
The picture below shows the cross-section of various species in the infrared spectrum for a hot Jupiter (from Burrows 2014 ).
A further point to consider is that, since they are cooler, in terms of contrast, exoplanets are likely to be relatively brighter with respect to their host stars in the infrared part of the spectrum.
As a final point, to address some comments below your question: as far as exoplanets are concerned, the use of the IR band has nothing to do with cosmological redshift. All the exoplanets that JWST will conduct a detailed study of will be in our own Galaxy and will have small radial velocities.

()
