Two mapping methods to study magnetic field lines near the separatrix of poloidal divertor tokamaks in the presence of external non-axisymmetric magnetic perturbations are proposed. The first mapping method is based on the Hamiltonian formulation of field line equations in the Boozer coordinates and solving it by the canonical transformation of variables (Abdullaev et al 1999 Phys. Plasmas 6 153). The second mapping is a canonical mapping near the separatrix which is constructed using the recently developed method (Abdullaev 2004 Phys. Rev. E 70 064202, Abdullaev 2005 Phys. Rev. E 72 064202). We construct the corresponding mappings for magnetic field lines in divertor tokamaks in the presence of non-axisymmetric magnetic perturbations. The mappings are applied to study the properties of open stochastic field lines near the separatrix for the wire model of the plasma. Poincaré sections, the so-called laminar and magnetic footprint plot (a contour plot of wall to wall connections lengths) in the plasma region and on the divertor plates are obtained. The quasilinear diffusion coefficients of field lines are also estimated.