From 0ced822c326253c3ae7f2806c0cd833355773be8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 31 Oct 2026 06:17:34 +0000 Subject: [PATCH 1/2] Initial plan From 12cee0e439e78b909f94b13c99e055245c2b47db Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 31 Oct 2026 06:18:43 +0000 Subject: [PATCH 2/2] Apply remaining changes Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com> --- lib/helper/Puppeteer.js | 2 +- test/helper/webapi.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/helper/Puppeteer.js b/lib/helper/Puppeteer.js index 7102f35da..ffd12551a 100644 --- a/lib/helper/Puppeteer.js +++ b/lib/helper/Puppeteer.js @@ -2271,7 +2271,7 @@ class Puppeteer extends Helper { const els = await this._locate(locator) const array = [] for (let index = 0; index < els.length; index++) { - const a = await this._evaluateHandeInContext((el, attr) => el[attr] || el.getAttribute(attr), els[index], attr) + const a = await this._evaluateHandeInContext((el, attr) => (attr === 'style' ? el.getAttribute(attr) : el[attr] || el.getAttribute(attr)), els[index], attr) array.push(a) } return array diff --git a/test/helper/webapi.js b/test/helper/webapi.js index 9f1b08ad9..bde263077 100644 --- a/test/helper/webapi.js +++ b/test/helper/webapi.js @@ -1469,6 +1469,12 @@ export function tests() { assert.equal(val, 'oldfag') }) + it('should grab full style attribute', async () => { + await I.amOnPage('/form/example1') + const style = await I.grabAttributeFrom('#LoginForm_username_em_', 'style') + assert.equal(style, 'display:none') + }) + it('should grab attribute from element', async () => { await I.amOnPage('/search') const val = await I.grabAttributeFrom(