Hello, and thank you for using this service. I'll be helping you with your problem today.
That's really at hard question to answer to be honest. If you were up front that this issue can't be tested for certain but it could be one of a couple parts, then the customer has the knowledge ahead of time that it could need a different part but you'd do your best to guess from your experience which one is bad--you could then definitely work something out with splitting the cost. If there was no mention that something else could be causing the problem and you just told them that it needs "X" part and it didn't fix the issue, you probably shouldn't change them for the part, but you could still explain to them that you'd need to charge them for the time it took to install the part since the job ended up taking longer than originally anticipated.