welcome. Use getAttribute('href') and explicitly resolve the URL instead: