Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] AvailWidth/Height #3990

Closed
aaronD14 opened this issue Sep 27, 2020 · 1 comment · Fixed by #4550
Closed

[BUG] AvailWidth/Height #3990

aaronD14 opened this issue Sep 27, 2020 · 1 comment · Fixed by #4550
Assignees

Comments

@aaronD14
Copy link

Im using webkit my code:

const { webkit, devices } = require('playwright');
const iPhone = devices['iPhone 6'];

(async () => {
const browser = await webkit.launch({ headless: false });
const context = await browser.newContext({
...iPhone
});

await context.addInitScript({
path: 'evasions.js'
});

const page = await context.newPage();

await page.goto('https://bot.sannysoft.com/');

await page.waitForTimeout(50000); // Rest your eyes for five seconds
// other actions...
await browser.close();
})();

The problem Is that AvailWidth and AvailHeight are not the same like OuterHeight and OuterWidth.
screenshot: https://prnt.sc/uos5t0
And Is there a way to change ColorDepth and PixelDepth In webkit?

@aaronD14
Copy link
Author

Found it myself use this: https://developer.mozilla.org/en-US/docs/Web/API
example:
Object.defineProperty(window.screen, 'availHeight', {
value: '667',
configurable: true // necessary to change value more than once
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants