Can digital ohmmeters be used to test electric capacitors?

Used on it's own, a digital multimeter set for resistance, will not give you a value. You can however determine if the capacitor has totally failed.
If you measure the resistance of an electrolytic capacitor, you should get a rising reading, going from near zero and rising up to maximum resistance. If you then immediately reverse the leads, you should get a negative reading, dropping through zero and then rising again to maximum resistance.
The speed at which this happens is a function of the capacitance. A high value will take longer to change value.
Some capacitors may fail short circuit and this will be immediately evident with a zero resistance reading. Some may fail open circuit, where you will not detect a change in value when reversing the leads, but will instead get an infinity reading.
This only works with high value capaitors, above 5uFd, electrolytic or tantalum bead.