Skip to content

Commit

Permalink
Update browser.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
AgnesToulet committed Nov 14, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 92bff43 commit ac20d38
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/browser/browser.ts
Original file line number Diff line number Diff line change
@@ -180,10 +180,11 @@ export class Browser {
const styles = await page.$eval("[class$='panel-title']", (el) => {
const stylesObject = getComputedStyle(el);
const styles = {};
for (const prop in stylesObject) {
styles[prop] = stylesObject[prop];
for (const i in Object.keys(stylesObject)) {
const prop = stylesObject[i];
if (stylesObject.hasOwnProperty(prop)) styles[prop] = stylesObject[prop];
}
return stylesObject;
return styles;
});

this.log.info('getstyles', 'styles', styles);

0 comments on commit ac20d38

Please sign in to comment.