when our pups have an accident in the house- it is our fault for not taking them out. Clearly they can't talk (that would make things SO much easier
) so it is up to us to recognize their cues that they need to go out. If you scold her, she is just going to start having accidents where you can't find it and thus can't get mad at her. She can't put two and two together that you are getting mad because she pooped.
When Layla would have an accident, if i cuaght her mid accident i would call her name to try and get her to stop, pick her up, take her outside and praise her whether or not she did anything.
If i saw the accident after it happened- i just cleaned it up and tried to watch her better.