Pulling 1st image from google to save the image path to variable

document.querySelector("#islrg > div.islrc > div:nth-child(1) > a.wXeWr.islib.nfEiy.mM5pbd > div.bRMDJf.islir > img")

this returns in chrome the details of 1st image result from Google. I want to save the returned values into a variable in KM so I can then perform regex to extract the details I need. However I place the above into an execute javascript in chrome action and nothing gets returned