Electricty was not created by people; therefore no on "invented" it. It was discovered, and not by Franklin or Tesla, athough they were both instrumental in taking note of its properties and improving on theories, or on designs that utilized electricity.
Even the Ancient Egyptians and Greeks knew about electricity. See this link:
https://en.wikipedia.org/wiki/Electricity