How to Test if wire is connected with Arduino
You have linear actuator that disconnets itself when reaching its limit position. To determine whether it reached one of the limit positions you can check whether the device is draining any current. You can place shunt resistor of small value and measure the voltage on it by arduino's analog input pin.