4 ms·
In that case, it will write into #foobar because it is smart enough to understand that <input/>s can be written to, and not labels. It works in a way that is ve
by mherrmann 13y ago
In that case, it will write into #foobar because it is smart enough to understand that <input/>s can be written to, and not labels.
It works in a way that is very similar to us humans: If someone tells us to "write 'Michael' into the 'First Name' field", we look for the text "First Name" and then to the right and bottom of this text if there is a field that can be written to. So, position in this case is position on the page in (x, y) coordinates.
If there are multiple occurrences (eg. two "First Name" fields) then Helium scans the page top-to-bottom, and closest to the element you last interacted with. Like a human would normally also do.