slits={Rectangle[{-0.25,0.3},{0, 0.4}],Rectangle[{-0.25,0.6},{0, 0.7}]};
square=Rectangle[{0,0},{1,1}];
Ω=RegionUnion[slits[[1]],slits[[2]],square];
Needs["NDSolve`FEM`"]
mesh=ToElementMesh[Ω, "MeshOrder"-> 1];
mesh["Wireframe"]
(*Remove semicolon for more detailed mesh*)
Show[mesh["Wireframe"["MeshElementIDStyle"->Red]],mesh["Wireframe"["MeshElement"->"PointElements","MeshElementIDStyle"->Blue]]]
nodes = mesh["Coordinates"];
elements = mesh["MeshElements"][[1,1]];
boundary =Flatten[mesh["BoundaryElements"][[1,1]]];
boundary=DeleteDuplicates[boundary];
(Subscript[Γ, D])=Cases[nodes[[boundary]],{x_,_}/;x== -0.25];
boundNodes = Flatten[Nearest[nodes->"Index",(Subscript[Γ, D]),1]];