I'm adding an electric boiler 240 volt. Can I use the same breaker from the dryer? I don't have room to add another breaker on my electric panel.
If you live in the US. Then NEC Article 210.23(2) states that you cannot exceed the circuit ampere rating more than 50% of the total rating of the dryer. NEC Article 220.54 states you shall rate the dryer at 5000W (V/A) or the name plate rating of the dryer whichever is larger.
So 5000W/240V = 20.8A (more than 50% of 30A). That means NO you cannot use the circuit to power both your boiler and the dryer on the same circuit.
You might try to revisit your Panel and see if it accepts half size breakers and see if you can create some space in it, or the only other practical solution I can see, would be to install a subpanel.
Hope this helps.
If not violating local codes, there might be a solution via load shedding relais, which avoids parallel use, what should be no problem in this case unless both the electronic control systems - if any - of the units are incompatible. The unit having lower prioritization must be compatible, since only that unit will be shut on/off via the relais or contactor. Older units without any electronics should be fine with those power interruptions.
This relais could be installed in the unit with higher power (2nd option would be to choose the incompatible unit for the installation to control the compatible one), and a second normal relais or contactor in the other unit, a cable has to be run between the devices. Thus no space is needed in the panel. The English Wikipedia entry seems to be missing (maybe that is an indication that it is not allowed in most english language areas), here is a translation from the German page:Load Shedding Relais