I am referring to musicals as opposed to the traditional operas.
Can I ask how you are defining the difference between a musical and an opera? Recitative vs. plain-spoken dialogue maybe? And by "became an art form" do you mean just when musical drama started existing?
It's very hard to answer this question. The divide between musical theater and opera is often debated and not very clear. Also, there were pieces we might call "musicals" (music dramas, plays with music) long before what we now call opera was invented.