How to identify whether an infinitive phrase functions as a direct object or an object complement?
For example, in the sentence:
"Everyone wanted Carol to be the captain of the team.
(cited from https://owl.english.purdue.edu/owl/resource/627/03/), Purdue University Online Writing Lab say "to be the captain of the team" functions as the direct object of the verb "want".
I am confused because I think the infinitive phrase functions as an object complement to give more information about "Carol". Am I wrong?