Technically, considering both a company and a candidate are in the same ballpark as to salary range, salary expectation is the only leverage a candidate has left for further negotiations. There is no reason to give away every single leverage. Everything else a candidate will provide during the interview process. Expected salary is the only thing left unknown to a recruiter.
Advice that is the equivalent to "wait and see" can be thought of as, not only wrong, but actively working against the candidate.
So you do all that upfront legwork, jump through a bunch fo hoops and only for offer is well below expectations. If you knew this number at the start you would have politely declined but now you find yourself in a sunk cost conundrum and say yes when you really should be saying no.
Do the day of answering the same questions over and over, code your red-black tree balancing exercise, ace the interview.
After all that, get the offer and find out it's 25% less than you're making now.
Good luck.