Samantha Nicol, 44, told the High Court in Edinburgh the man spent approximately half an hour in Ardgowan Street, Greenock, Inverclyde, in the early hours of June 2, 1986.
Ms Nicol told the court she saw the man walking up and down the street hours before 16-year-old Elaine's remains were discovered in a lane off the thoroughfare.
Ms Nicol - who used to live in Greenock - told advocate Donald Findlay, QC: "It just seemed irregular."
Ms Nicol, now of Motherwell, North Lanarkshire, was giving evidence in proceedings against John Docherty, 49, who denies murdering Elaine in 1986.
Ms Nicol told Mr Findlay, who is representing Docherty, she was watching TV when her dog started growling. She went to the window of her parents' home and saw the man walking along the street.
Ms Nicol thought the man was looking for the number of a house in the street. When Mr Findlay asked Ms Nicol whether she knew the man, she replied: "No." She said he spent approximately 30 minutes in the street.
The court later heard that Ms Nicol gave a statement to police on June 8, 1986.
Docherty, now of Dunoon, denies murder and claims that at the time he is alleged to have stripped and strangled Elaine, he was with his parents - who are no longer alive - at their home in Anne Street, Greenock.
Docherty has also lodged a special defence of incrimination. It claims the culprit may be among a list of 41 names. The trial continues.