Generally, if there is no existing answer that solves the full problem, it is often worthwhile to post an answer that will solve half the problem. However, it's important to explain clearly in your answer what part it does solve and what part it doesn't solve.
I noticed that the answer you linked to just shows some code, but doesn't mention that it solves only half the problem and doesn't explain what part it left unsolved. Since you asked for feedback, it would be better to edit your answer to incorporate that information as well.
Also, if you're posting an answer that only solves part of the problem, be careful that you're solving an important, substantial part of the problem. If you're only solving an incidental or minor or secondary part of the problem, posting such an answer might not be as useful.
In your specific case, I view your answer as borderline. The question asks for a way to open Google Chrome, click on a button, and then close Chrome. The author knows how to open Chrome. Your answer shows how to close Chrome, but not how to click the button. I would consider clicking the button to be essential to the question and the primary task; arguably, closing the window is secondary. Answering only the secondary part might not be super useful in this context. I don't know of any rules that prohibit such an answer, but readers are free to judge your answer accordingly and to upvote or downvote based on their own personal assessment of how useful it is.
Also, if the question is actually a combination of two or more distinct questions, then you might want to vote to close the question as "too broad". Generally, we expect people to post one question per question; if they have two distinct questions, it is usually better to post them in two separate posts.