This paper describes path-planning and traveling-control algorithms for a pesticide-spraying robot in a greenhouse. In order to search for a suitable path, we applied graph theory and expressed a greenhouse map as a set of nodes and branches. The robot searches for the path from the start node to the goal node through all branches that it needs to spray. Moreover, the robot can identify its position on a map by detecting the shapes of plant beds and walls using a laser range finder (LRF) and can decide which direction to turn. In addition, if its pesticide tank is empty, the robot needs to return to the charge node to obtain more pesticide, and then restarts traveling and spraying. We consider the validity of the path planning and traveling control from simulation results and experimental results obtained using a mock-up model of a greenhouse lane.