We usually use the past continuous with words, like when, or as or while. So we often say, while she was coming home, a friend greeted her in the street. Or, as she was coming home, a friend greeted her in the street, or when she was coming home, a friend greeted her in the street.