selenium-with-fingerprints
selenium-with-fingerprints copied to clipboard
Not working, the browser not open
i tried your readme codes
const { plugin } = require('selenium-with-fingerprints');
// Set the service key for the plugin (you can buy it here https://bablosoft.com/directbuy/FingerprintSwitcher/2).
// Leave an empty string to use the free version.
plugin.setServiceKey('');
(async () => {
// Get a fingerprint from the server:
const fingerprint = await plugin.fetch({
maxWidth: 1366, // max width pixel of device
maxHeight: 768, // max height pixel of device
tags: ["Microsoft Windows", "Chrome"],
enablePrecomputedFingerprints: true
});
// Apply fingerprint:
plugin.useFingerprint(fingerprint);
// Launch the browser instance:
const driver = await plugin.launch();
// The rest of the code is the same as for a standard `selenium` library:
await driver.get('https://example.com');
// Print the browser viewport size:
console.log(
'Viewport:',
await driver.executeScript(() => ({
deviceScaleFactor: window.devicePixelRatio,
width: document.documentElement.clientWidth,
height: document.documentElement.clientHeight,
}))
);
await driver.quit();
})();
but nothing happens, no browser opened after waiting download files while running above codes.
here my package.json dependencies
{
"dependencies": {
"browser-with-fingerprints": "^1.7.1",
"chromedriver": "^127.0.2",
"sbg-utility": "^1.1.6",
"selenium-webdriver": "^4.24.0",
"selenium-with-fingerprints": "^1.6.3"
}
}
any wrong ?