'writing the correct xpath query in puppeteer

I am trying to get the get a DOM element by the following xpath //*[@id='main']/footer/div[1]/div/div/a and clicking on it using puppeteer. However I am getting "not a valid selector" for the xpath query. What should be the equivalent query for puppeteer?

Note: there is a following question regarding clicking on a DOM using puppeteer, but my question is more on writing the correct xpath query in puppeteer rather than the click



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source