A specified technique using X-ray from synchrotron sources was developed to contribute the optimization of the condition of electrodeposition directly. For this purpose, the design of the confinement equipped with electrodes has been optimized. Some case studies such as an alloy formation of Ce with Ni have been examined in-situ under the X-ray irradiation. Still a lot of tasks remains to apply the real system of electrolyzer, by the combination of XAFS and imaging technique, redox reactions occurring inside the un-visible confinements would be well identified.