Considerable progress in understanding the dynamics of fish locomotion has been made through studies of live fishes and by analyzing locomotor kinematics, muscle activity, and fluid dynamics. Studies of live fishes are limited, however, in their ability to control for parameters such as length, flexural stiffness, and kinematics. Keeping one of these factors constant while altering others in a repeatable manner is typically not possible, and it is difficult to make critical measurements such as locomotor forces and torques on live, freely-swimming fishes. In this article, we discuss the use of simple robotic models of flexing fish bodies during self-propulsion. Flexible plastic foils were actuated at the leading edge in a heave and/or pitch motion using a robotic flapping controller that allowed moving foils to swim at their self-propelled speed. We report unexpected non-linear effects of changing the length and stiffness of the foil, and analyze the effect of changing the shape of the trailing edge on self-propelled swimming speed and kinematics. We also quantify the structure of the wake behind swimming foils with volumetric particle image velocimetry, and describe the effect of flexible heterocercal and homocercal tail shapes on flow patterns in the wake. One key advantage of the considerable degree of control afforded by robotic devices and the use of simplified geometries is the facilitation of mathematical analyses and computational models, as illustrated by the application of an inviscid computational model to propulsion by a flapping foil. This model, coupled with experimental data, demonstrates an interesting resonance phenomenon in which swimming speed varies with foil length in an oscillatory manner. Small changes in length can have dramatic effects on swimming speed, and this relationship changes with flexural stiffness of the swimming foil.