Most dictatorships have elections. The defining feature is that the ruling government decides who can be elected. Right now U.S. president Trump toys with various ideas to ensure that only his supporters can be elected. In Iran all candidates are vetted to ensure that only supporters of the dictatorship are elected.
There was one president of Iran, Khatami, tried to make some few changes, but failed, and of course he was not allowed to become president ever again: the office of president in Iran is more like the French prime minister who only has the function of executing policies that his boss, the president, has decided, and of course to take the blame if anything goes wrong. The difference between the two systems is of course that the French president cannot decide how the parliament looks like, and he can be removed in an election.