-
-
Notifications
You must be signed in to change notification settings - Fork 601
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
Is there a way to resize the innerWidth & innerHeight for Non Headless Chrome? #943
Comments
You can change this in your create config create({
puppeteerConfig: {
width : 1366,
height: 768
}
}) |
doesn't work code: const { create, Client } = require('@open-wa/wa-automate')
create('nurutomo', {
headless: false,
useChrome: true,
puppeteerConfig: {
width : 1366,
height: 768
}
})
.then(client => start(client))
.catch(err => new Error(err))
function start(client = new Client()) {
client.onAnyMessage(msg => {
console.log(msg.sender.pushname || msg.sender.verifiedName || msg.sender.formattedName, msg.body || msg.caption)
})
} |
My mistake, that is not implemented yet. |
similar issue puppeteer/puppeteer#1183 |
wa-automate-nodejs/src/config/puppeteer.config.ts Lines 1 to 5 in 1a2d38c
|
yep. on the todo list |
about right here needs change wa-automate-nodejs/src/controllers/browser.ts Lines 15 to 27 in 1a2d38c
|
Yes, I know.. |
@github-actions run ⚡ Release! ⚡(async () => {
function exec(cmd) {
console.log(execSync(cmd).toString());
}
// Config
const gitUserEmail = "github-actions[bot]@users.noreply.github.com";
const gitUserName = "github-actions[bot]";
exec(`echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc`);
exec(`git config --global user.email "${gitUserEmail}"`);
exec(`git config --global user.name "${gitUserName}"`);
exec(`npm i`);
exec(`npm run release-ci`);
//comment on the issue
var result = execSync(`npx auto-changelog -o ./tempchangelog.txt --commit-limit false --template ./compact-keepachangelog.hbs --stdout`).toString();
await postComment(result);
//create changelog image
exec(`npm run release-image`);
exec(`git commit -a -m 'updated release-image'`);
exec(`git push --force`);
})(); |
wa-automate-nodejs/demo/index.ts Lines 235 to 238 in dc7bcd0
Uhmm...I tried the options/config above, it doesnt work. i renamed key from Working code const { create, Client } = require('@open-wa/wa-automate')
create('nurutomo', {
headless: false,
useChrome: true,
// viewport: {
window: {
width : 1280,
height: 720
}
}).then((client) => start(client))
function start(client = new Client()) {
client.onAnyMessage(message => {
let name = message.sender.pushname || message.sender.verifiedName || message.sender.formattedName
let text = message.body || message.caption
console.log(`(${name}) ${text}`)
})
} wa-automate-nodejs/src/controllers/browser.ts Lines 23 to 27 in dc7bcd0
|
working as |
Currently the default innerSize is
1440 by 900
With that size, my window cropping it (My screen resolution is
1366 by 768
)Console Debugger:
My expectation is the innerSize matching the windowSize
The text was updated successfully, but these errors were encountered: