You are certainly referring to RUR (Rossum's Universal Robots), a play by Karel Capek. It introduced the common concept of the robot, and he is credited with inventing the word (although it actually existed as a description of anybody who performs a repetitive task). Written in 1920, the play features robots that really don't resemble the steel automatons of popular science fiction. Capek's robots resembled flesh-and-blood humans, and possibly the clay Golem (also first written by a Czech writer). Most early fictional robots were alluring females that unwitting human males fell in love with, and Capek's robots were certainly in this vein.
The play is a little dense for modern audiences, but it broke ground for a lot of subsequent science fiction stories.