PROBLEM TO BE SOLVED: To provide a method of preparing a photosensitive resin composition which makes it possible to obtain a cured film having excellent transparency, and also having excellent adhesion to an inorganic material surface even after chemical treatment.SOLUTION: A method of preparing a photosensitive resin composition is selected, the photosensitive resin composition comprising (A) a photopolymerizable monomer, (B) a transparent resin, (C) a photopolymerization initiator, (D) a solvent and (E) a silane coupling agent, where with respect to the total mass of the (E) silane coupling agent, moisture of 5.0-18.0 mass% is added.