Not quite as invisibility since it has its own caveats, emphasis mine.
You are also adept at evading creatures that rely on darkvision. Such
creatures gain no benefit when attempting to detect you in dark and dim conditions. Additionally, when the DM determines if you can hide
from a creature, that creature gains no benefit from its darkvision.
UA: The ranger, revised P. 8
The main difference is that, invisibility does not end when you are detected by other means that are not magical or with special senses but, in the ranger case, the condition/ability ends as soon as the ranger is detected.
The invisibility condition in PHB 191.
An invisible creature is impossible to see without the aid of magic
or a special sense. For the purpose of hiding, the creature is heavily
obscured. The creature’s location can be detected by any noise it
makes or any tracks it leaves.
Attack rolls against the creature have disadvantage, and the creature’s attack rolls have advantage.
Now, about detection; attacking or casting a spell make you lose the benefit as stated in PHB. 195. Also, there is a big difference between dark and dim conditions (PHB. 183). The main difference is that with normal sight you can see the ranger in dim conditions but you are blinded in dark conditions. Therefore, the ranger in dim condition is not treated as if it has invisibility/heavily obscured, the ranger is treated as if in dim condition.
(PHB 195) If you are hidden—both unseen and unheard—when you make an attack, you
give away your location when the attack hits or misses.
(PHB 183) A given area might be lightly or heavily obscured. In a lightly
obscured area, such as dim light, patchy fog, or moderate foliage,
creatures have disadvantage on Wisdom (Perception) checks that rely on
A heavily obscured area—such as darkness, opaque fog, or dense
foliage—blocks vision entirely. A creature in a heavily obscured area
effectively suffers from the blinded condition.
Thus, against the ranger when trying to detect him in dark or dim light condition, a Dark Elf and a Human are not treated differently, as if they have the same visual capacities.
As an example, by courtesy of Keithcurtis; Robbie the Ranger and Frank the Fighter are trying to sneak past Danny the Drow and Harry the Human in a dimly lit cavern. Harry has disadvantage on the opposing perception on both the sneakers, while Danny only has disadvantage against Robbie the Ranger.