The present invention discloses an automation test wire of a photoelectric detector. The test wire comprises a detection tool and an automatic push track, the detection tool comprises a rack, an upper tool plate and a lower tool plate, the lower tool plate is fixed on the rack, the two sides of the upper tool plate are respectively provided with one set of driving mechanism, each driving mechanism comprises a cylinder, a guiding track, a lower movable block, an upper movable block, a pressure spring and a connection rod, and the automatic push track comprises a first track cylinder, a second track cylinder, a pneumatic track sucker, a track conveyer belt and a track structure. Operators can directly put the photoelectric detector into a grip slipper from the right side to avoid hidden troubles caused by an original design, improve the safety operation coefficients, improve the operation field of vision and allow the operation to be more convenient and rapid. The automation test wire of the photoelectric detector can automatically push the photoelectric detector into the tool, is high in automation degree, can realize reciprocating motion of the photoelectric detector and can greatly improve detection efficiency.