cel on on 1999 Toyota Camry

my cel lite has been on steady for past 60k miles local Toyota dealer suggested change fuel cap, which I did, still on, can disconnect batty and lite goes off, but reappears after 30 miles of driving, any suggestions

Asked by for the 1999 Toyota Camry
Your car has on board diagnostics 2 (OBD2). Did the dealer plug in a scan tool to a 16 pin diagnostic socket under the drivers side of the dash to retrieve codes stored in your cars computer.
If they guessed it was a gas cap issue the light was turned on when the computer saw a fault with the evaporative emission system and the system needs to be properly diagnosed not just turn if the light. If it resets the Check engine light a second time there is a problem and a Toyota dealer or Toyota specialist/independent repair shop should be able to fix the problem.