Look at the structure of the sentence. The easiest direct objects to locate are those found in subject-verb-object sentence structure; for example, in the sentence: "Edward plays the violin," the answer to the question "plays what?" is obvious. If the sentence is altered, as in "Edward plays the violin and the viola," there are two direct or compound direct objects: "the violin" and "the viola."
Determine what or who is the direct object --- it may not be immediately apparent, as in the question, "Who gave Francis a black eye?" Francis may be the recipient of the black eye; however, the question "gave what" indicates that the direct object is "a black eye." "Francis" is the indirect object, which answers the question for an indirect object, "to whom?"
Ask "whom" or "what" to find a direct object that does not, at first, appear to be one: "They wanted to swim in the Pacific Ocean." The direct object is the infinitive "to swim," --- look at the verb, and then ask, "verb what?" Try and replace the direct object with a pronoun, as in "they wanted it," if it doesn't replace properly, look again for the direct object.
Check for direct objects in the beginning of sentences, especially passive ones. For example, in "Every marble in town had been purchased by the tournament sponsors," the direct object is the leading noun phrase "every marble in town," answering the question "purchased what?" and passing the object pronoun test: "purchased them."