Solved! Go to Solution.
You should be able to use a css selector and get the attribute by using "@", just as described in the hint text below.
So in your case #j_username@value should work (in case the ID is set).
However I do not think it is a good idea to query this value as it might change dynamically, users might mistype their names and try to login and you'll end up with all sorts of incorrect usernames in Dynatrace.
It would be better to use the JS API to report the actual name after the login was successful.