Electron beams and betatron X-ray radiation generated by laser wakefield acceleration in long plasma targets are studied. The targets consist of hydrogen filled dielectric capillary tubes of diameter 150 to 200 microns and length 6 to 20 mm. Electron beams are observed for peak laser intensities as low as 5 × 1017 W/cm2. It is found that the capillary collects energy outside the main peak of the focal spot and contributes to keep the beam self-focused over a distance longer than in a gas jet of similar density. This enables the pulse to evolve enough to reach the threshold for wavebreaking, and thus trap and accelerate electrons. No electrons were observed for capillaries of large diameter (250 ?m), confirming that the capillary influences the interaction and does not have the same behaviour as a gas cell. Finally, X-rays are used as a diagnostic of the interaction and, in particular, to estimate the position of the electrons trapping point inside the capillary.