detect Browser and OS details using Playwright

npm i --save-dev ua-parser-js
const uaParser = require('ua-parser-js');const getUA = await page.evaluate(() => navigator.userAgent);const userAgentInfo= uaParser(ua);// get browser nameconsole.log(userAgentInfo.browser.name);

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Abhinaba Ghosh

Abhinaba Ghosh

Tech Lead Manager @Postman 🚀 | Space Movie Lover 🪐 | Coder 👨‍💻 | Traveller ⛰️