I just bought an LED driver and tried to measure the voltage and current using a multimeter so that I have an idea of how many LEDs can be connected. The voltage measured at about 40v, but when I tried measuring the current, the wire just sparked... Now if I have an LED that is 3V/1A, how many can be connected and in series or parallel?
You can't measure current without a load.
If you do, you'll create a short (and that is what you did, generating those sparks).
Watts is the unit that expresses power.
Power is voltage times current.
So if you have a 30 watts power supply, it would be able to power 10 * (3V* 1A).
Because that supply is 30 watts and 28 to 40 volts, it can supply a current of 1 A at best (it says it can supply 1.5 A).
So the specs are a bit contradicting, you can't have both 40 volts and 1.5 A because that would mean 60 watts.
That means you should put all LEDs in series.
Putting 'n' in parallel would mean you'd try to draw a current of 'n' * 1A, and that supply can't do that (so the photo says).
I have no doubt that if you put 10 of those 1A LEDs in series, and then measure the voltage at the supply, you will not even get to that 30 volts.
Now let's see how long it takes for someone to pop up telling a current limiting resistor is not necessary in this case, and that it wasn't mentioned yet either, so that assumption must be correct.
Just a minor correction: the "50W" version states 1.5A; the "30W" version states .9A.
I think the more appropriate way to describe LED drivers like these is that they just plain output the given amperage (.9A), but they can only regulate that amperage stably when the total forward voltage of the LEDs is between 28 and 40Vf. It is safe to connect LEDs where the total forward voltage is outside of 28 to 40Vf but what you'll see is a lot of flickering of those LEDs.
In other words, describing it as a "30W" driver is inappropriate. It's really a .9A current regulator that is only stable with a LED string between 28 and 40Vf. And as a corollary to that the critical spec is the .9A current -- make sure the LEDs you're using are designed for .9A.