The flow behaviors of two-dimensional (2D) wet monodisperse and polydisperse foams are investigated by the quasi-static simulation. We set the same inlet velocity on the cross section of the foam channel and then focus on the elastic–plastic deformation of the 2D wet foam according to the strain caused by the foam flow. The gas fraction in foam is referred to as foam quality and the effects of foam quality on the shear modulus, bubble dynamics, and stress–strain properties are obtained by the simulation. In the elastic domain, the shear modulus of monodisperse foam decreases exponentially with foam quality, but for the polydisperse foam, the shear modulus tends to increase. The shear banding of the polydisperse foam appears in the low strain and disappears gradually as the strain and foam quality increase. We adopt shear rate to represent the change rate of average bubbles displacements versus y-coordinates and find that the distribution of shear rate in the y-direction changes with iteration. Additionally, energy of the foam is stored and dissipated with the elastic–plastic deformation of the foam. The average shear stress generated by the foam structure and the initial increment of normal stress difference caused by the elastic deformation increase with the increase of foam quality.