I have done a research and it seems that the correct answere is actually "after take-off". According to ICAO CAP 444 its says that if the aircraft is taking off in to IMC conditions the daprture frequency should be set prior to the aircraft being airborne.
BUT in real life I always wait for the tower to tell me to switch to departure frequency unless otherwise stated in the SID. But I am afraid that the coerrect answere in the JAA exam is "after take off"