playwright-core
Advanced tools
Comparing version 1.51.0-alpha-1740489818000 to 1.51.0-alpha-1740682850000
@@ -6,11 +6,11 @@ { | ||
"name": "chromium", | ||
"revision": "1160", | ||
"revision": "1161", | ||
"installByDefault": true, | ||
"browserVersion": "134.0.6998.23" | ||
"browserVersion": "134.0.6998.35" | ||
}, | ||
{ | ||
"name": "chromium-headless-shell", | ||
"revision": "1160", | ||
"revision": "1161", | ||
"installByDefault": true, | ||
"browserVersion": "134.0.6998.23" | ||
"browserVersion": "134.0.6998.35" | ||
}, | ||
@@ -17,0 +17,0 @@ { |
@@ -298,12 +298,14 @@ "use strict"; | ||
async body() { | ||
try { | ||
const result = await this._request._channel.fetchResponseBody({ | ||
fetchUid: this._fetchUid() | ||
}); | ||
if (result.binary === undefined) throw new Error('Response has been disposed'); | ||
return result.binary; | ||
} catch (e) { | ||
if ((0, _errors.isTargetClosedError)(e)) throw new Error('Response has been disposed'); | ||
throw e; | ||
} | ||
return await this._request._wrapApiCall(async () => { | ||
try { | ||
const result = await this._request._channel.fetchResponseBody({ | ||
fetchUid: this._fetchUid() | ||
}); | ||
if (result.binary === undefined) throw new Error('Response has been disposed'); | ||
return result.binary; | ||
} catch (e) { | ||
if ((0, _errors.isTargetClosedError)(e)) throw new Error('Response has been disposed'); | ||
throw e; | ||
} | ||
}, true); | ||
} | ||
@@ -310,0 +312,0 @@ async text() { |
@@ -50,2 +50,3 @@ "use strict"; | ||
} | ||
if ((options === null || options === void 0 ? void 0 : options.visible) !== undefined) this._selector += ` >> visible=${options.visible ? 'true' : 'false'}`; | ||
if (this._frame._platform.inspectCustom) this[this._frame._platform.inspectCustom] = () => this._inspect(); | ||
@@ -192,8 +193,2 @@ } | ||
} | ||
visible(options = {}) { | ||
const { | ||
visible = true | ||
} = options; | ||
return new Locator(this._frame, this._selector + ` >> visible=${visible ? 'true' : 'false'}`); | ||
} | ||
and(locator) { | ||
@@ -200,0 +195,0 @@ if (locator._frame !== this._frame) throw new Error(`Locators must belong to the same frame.`); |
@@ -87,5 +87,2 @@ "use strict"; | ||
async move(x, y, button, buttons, modifiers, forClick) { | ||
// Bidi throws when x/y are not integers. | ||
x = Math.floor(x); | ||
y = Math.floor(y); | ||
await this._performActions([{ | ||
@@ -92,0 +89,0 @@ type: 'pointerMove', |
@@ -406,3 +406,3 @@ "use strict"; | ||
} | ||
async storageState(indexedDB = true) { | ||
async storageState(indexedDB = false) { | ||
const result = { | ||
@@ -409,0 +409,0 @@ cookies: await this.cookies(), |
@@ -113,3 +113,3 @@ { | ||
"Galaxy S5": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"viewport": { | ||
@@ -125,3 +125,3 @@ "width": 360, | ||
"Galaxy S5 landscape": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"viewport": { | ||
@@ -137,3 +137,3 @@ "width": 640, | ||
"Galaxy S8": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 7.0; SM-G950U Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 7.0; SM-G950U Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"viewport": { | ||
@@ -149,3 +149,3 @@ "width": 360, | ||
"Galaxy S8 landscape": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 7.0; SM-G950U Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 7.0; SM-G950U Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"viewport": { | ||
@@ -161,3 +161,3 @@ "width": 740, | ||
"Galaxy S9+": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; SM-G965U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; SM-G965U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"viewport": { | ||
@@ -173,3 +173,3 @@ "width": 320, | ||
"Galaxy S9+ landscape": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; SM-G965U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; SM-G965U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"viewport": { | ||
@@ -185,3 +185,3 @@ "width": 658, | ||
"Galaxy Tab S4": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 8.1.0; SM-T837A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 8.1.0; SM-T837A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Safari/537.36", | ||
"viewport": { | ||
@@ -197,3 +197,3 @@ "width": 712, | ||
"Galaxy Tab S4 landscape": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 8.1.0; SM-T837A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 8.1.0; SM-T837A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Safari/537.36", | ||
"viewport": { | ||
@@ -1109,3 +1109,3 @@ "width": 1138, | ||
"LG Optimus L70": { | ||
"userAgent": "Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"viewport": { | ||
@@ -1121,3 +1121,3 @@ "width": 384, | ||
"LG Optimus L70 landscape": { | ||
"userAgent": "Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"viewport": { | ||
@@ -1133,3 +1133,3 @@ "width": 640, | ||
"Microsoft Lumia 550": { | ||
"userAgent": "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 550) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36 Edge/14.14263", | ||
"userAgent": "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 550) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36 Edge/14.14263", | ||
"viewport": { | ||
@@ -1145,3 +1145,3 @@ "width": 360, | ||
"Microsoft Lumia 550 landscape": { | ||
"userAgent": "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 550) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36 Edge/14.14263", | ||
"userAgent": "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 550) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36 Edge/14.14263", | ||
"viewport": { | ||
@@ -1157,3 +1157,3 @@ "width": 640, | ||
"Microsoft Lumia 950": { | ||
"userAgent": "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36 Edge/14.14263", | ||
"userAgent": "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36 Edge/14.14263", | ||
"viewport": { | ||
@@ -1169,3 +1169,3 @@ "width": 360, | ||
"Microsoft Lumia 950 landscape": { | ||
"userAgent": "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36 Edge/14.14263", | ||
"userAgent": "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36 Edge/14.14263", | ||
"viewport": { | ||
@@ -1181,3 +1181,3 @@ "width": 640, | ||
"Nexus 10": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 10 Build/MOB31T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 10 Build/MOB31T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Safari/537.36", | ||
"viewport": { | ||
@@ -1193,3 +1193,3 @@ "width": 800, | ||
"Nexus 10 landscape": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 10 Build/MOB31T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 10 Build/MOB31T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Safari/537.36", | ||
"viewport": { | ||
@@ -1205,3 +1205,3 @@ "width": 1280, | ||
"Nexus 4": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"viewport": { | ||
@@ -1217,3 +1217,3 @@ "width": 384, | ||
"Nexus 4 landscape": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"viewport": { | ||
@@ -1229,3 +1229,3 @@ "width": 640, | ||
"Nexus 5": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"viewport": { | ||
@@ -1241,3 +1241,3 @@ "width": 360, | ||
"Nexus 5 landscape": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"viewport": { | ||
@@ -1253,3 +1253,3 @@ "width": 640, | ||
"Nexus 5X": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 5X Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 5X Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"viewport": { | ||
@@ -1265,3 +1265,3 @@ "width": 412, | ||
"Nexus 5X landscape": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 5X Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 5X Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"viewport": { | ||
@@ -1277,3 +1277,3 @@ "width": 732, | ||
"Nexus 6": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F26U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F26U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"viewport": { | ||
@@ -1289,3 +1289,3 @@ "width": 412, | ||
"Nexus 6 landscape": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F26U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F26U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"viewport": { | ||
@@ -1301,3 +1301,3 @@ "width": 732, | ||
"Nexus 6P": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 6P Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 6P Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"viewport": { | ||
@@ -1313,3 +1313,3 @@ "width": 412, | ||
"Nexus 6P landscape": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 6P Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 6P Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"viewport": { | ||
@@ -1325,3 +1325,3 @@ "width": 732, | ||
"Nexus 7": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Safari/537.36", | ||
"viewport": { | ||
@@ -1337,3 +1337,3 @@ "width": 600, | ||
"Nexus 7 landscape": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Safari/537.36", | ||
"viewport": { | ||
@@ -1393,3 +1393,3 @@ "width": 960, | ||
"Pixel 2": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"viewport": { | ||
@@ -1405,3 +1405,3 @@ "width": 411, | ||
"Pixel 2 landscape": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"viewport": { | ||
@@ -1417,3 +1417,3 @@ "width": 731, | ||
"Pixel 2 XL": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"viewport": { | ||
@@ -1429,3 +1429,3 @@ "width": 411, | ||
"Pixel 2 XL landscape": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"viewport": { | ||
@@ -1441,3 +1441,3 @@ "width": 823, | ||
"Pixel 3": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 9; Pixel 3 Build/PQ1A.181105.017.A1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 9; Pixel 3 Build/PQ1A.181105.017.A1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"viewport": { | ||
@@ -1453,3 +1453,3 @@ "width": 393, | ||
"Pixel 3 landscape": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 9; Pixel 3 Build/PQ1A.181105.017.A1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 9; Pixel 3 Build/PQ1A.181105.017.A1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"viewport": { | ||
@@ -1465,3 +1465,3 @@ "width": 786, | ||
"Pixel 4": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 10; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 10; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"viewport": { | ||
@@ -1477,3 +1477,3 @@ "width": 353, | ||
"Pixel 4 landscape": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 10; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 10; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"viewport": { | ||
@@ -1489,3 +1489,3 @@ "width": 745, | ||
"Pixel 4a (5G)": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 11; Pixel 4a (5G)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 11; Pixel 4a (5G)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"screen": { | ||
@@ -1505,3 +1505,3 @@ "width": 412, | ||
"Pixel 4a (5G) landscape": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 11; Pixel 4a (5G)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 11; Pixel 4a (5G)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"screen": { | ||
@@ -1521,3 +1521,3 @@ "height": 892, | ||
"Pixel 5": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"screen": { | ||
@@ -1537,3 +1537,3 @@ "width": 393, | ||
"Pixel 5 landscape": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"screen": { | ||
@@ -1553,3 +1553,3 @@ "width": 851, | ||
"Pixel 7": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 14; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 14; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"screen": { | ||
@@ -1569,3 +1569,3 @@ "width": 412, | ||
"Pixel 7 landscape": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 14; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 14; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"screen": { | ||
@@ -1585,3 +1585,3 @@ "width": 915, | ||
"Moto G4": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"viewport": { | ||
@@ -1597,3 +1597,3 @@ "width": 360, | ||
"Moto G4 landscape": { | ||
"userAgent": "Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Mobile Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Mobile Safari/537.36", | ||
"viewport": { | ||
@@ -1609,3 +1609,3 @@ "width": 640, | ||
"Desktop Chrome HiDPI": { | ||
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Safari/537.36", | ||
"screen": { | ||
@@ -1625,3 +1625,3 @@ "width": 1792, | ||
"Desktop Edge HiDPI": { | ||
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Safari/537.36 Edg/134.0.6998.23", | ||
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Safari/537.36 Edg/134.0.6998.35", | ||
"screen": { | ||
@@ -1671,3 +1671,3 @@ "width": 1792, | ||
"Desktop Chrome": { | ||
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Safari/537.36", | ||
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Safari/537.36", | ||
"screen": { | ||
@@ -1687,3 +1687,3 @@ "width": 1920, | ||
"Desktop Edge": { | ||
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.23 Safari/537.36 Edg/134.0.6998.23", | ||
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.35 Safari/537.36 Edg/134.0.6998.35", | ||
"screen": { | ||
@@ -1690,0 +1690,0 @@ "width": 1920, |
@@ -136,3 +136,3 @@ "use strict"; | ||
this.fetchLog.set(fetchUid, controller.metadata.log); | ||
const failOnStatusCode = params.failOnStatusCode !== undefined ? params.failOnStatusCode : !!defaults.apiRequestFailsOnErrorStatus; | ||
const failOnStatusCode = params.failOnStatusCode !== undefined ? params.failOnStatusCode : !!defaults.failOnStatusCode; | ||
if (failOnStatusCode && (fetchResponse.status < 200 || fetchResponse.status >= 400)) { | ||
@@ -496,3 +496,3 @@ let responseText = ''; | ||
extraHTTPHeaders: this._context._options.extraHTTPHeaders, | ||
apiRequestFailsOnErrorStatus: this._context._options.apiRequestFailsOnErrorStatus, | ||
failOnStatusCode: undefined, | ||
httpCredentials: this._context._options.httpCredentials, | ||
@@ -546,3 +546,3 @@ proxy: this._context._options.proxy || this._context._browser.options.proxy, | ||
extraHTTPHeaders: options.extraHTTPHeaders, | ||
apiRequestFailsOnErrorStatus: !!options.apiRequestFailsOnErrorStatus, | ||
failOnStatusCode: !!options.failOnStatusCode, | ||
ignoreHTTPSErrors: !!options.ignoreHTTPSErrors, | ||
@@ -574,3 +574,3 @@ httpCredentials: options.httpCredentials, | ||
} | ||
async storageState(indexedDB = true) { | ||
async storageState(indexedDB = false) { | ||
return { | ||
@@ -577,0 +577,0 @@ cookies: this._cookieStore.allCookies(), |
@@ -104,4 +104,7 @@ "use strict"; | ||
if (value && typeof value === 'object') { | ||
// eslint-disable-next-line no-restricted-globals | ||
if (typeof globalThis.Window === 'function' && value instanceof globalThis.Window) return 'ref: <Window>'; | ||
// eslint-disable-next-line no-restricted-globals | ||
if (typeof globalThis.Document === 'function' && value instanceof globalThis.Document) return 'ref: <Document>'; | ||
// eslint-disable-next-line no-restricted-globals | ||
if (typeof globalThis.Node === 'function' && value instanceof globalThis.Node) return 'ref: <Node>'; | ||
@@ -108,0 +111,0 @@ } |
@@ -191,3 +191,4 @@ "use strict"; | ||
function normalizeWhitespace(text) { | ||
return text.replace(/[\r\n\s\t]+/g, ' ').trim(); | ||
// TODO: why is this different from normalizeWhitespace in stringUtils.ts? | ||
return text.replace(/[\u200b\u00ad]/g, '').replace(/[\r\n\s\t]+/g, ' ').trim(); | ||
} | ||
@@ -194,0 +195,0 @@ function valueOrRegex(value) { |
@@ -295,3 +295,3 @@ "use strict"; | ||
case 'visible': | ||
return `visible(${body === 'true' ? '' : '{ visible: false }'})`; | ||
return `filter({ visible: ${body === 'true' ? 'true' : 'false'} })`; | ||
case 'role': | ||
@@ -383,3 +383,3 @@ const attrs = []; | ||
case 'visible': | ||
return `visible(${body === 'true' ? '' : 'visible=False'})`; | ||
return `filter(visible=${body === 'true' ? 'True' : 'False'})`; | ||
case 'role': | ||
@@ -488,3 +488,3 @@ const attrs = []; | ||
case 'visible': | ||
return `visible(${body === 'true' ? '' : `new ${clazz}.VisibleOptions().setVisible(false)`})`; | ||
return `filter(new ${clazz}.FilterOptions().setVisible(${body === 'true' ? 'true' : 'false'}))`; | ||
case 'role': | ||
@@ -577,3 +577,3 @@ const attrs = []; | ||
case 'visible': | ||
return `Visible(${body === 'true' ? '' : 'new() { Visible = false }'})`; | ||
return `Filter(new() { Visible = ${body === 'true' ? 'true' : 'false'} })`; | ||
case 'role': | ||
@@ -580,0 +580,0 @@ const attrs = []; |
@@ -127,3 +127,3 @@ "use strict"; | ||
// Transform to selector engines. | ||
template = template.replace(/\,set([\w]+)\(([^)]+)\)/g, (_, group1, group2) => ',' + group1.toLowerCase() + '=' + group2.toLowerCase()).replace(/framelocator\(([^)]+)\)/g, '$1.internal:control=enter-frame').replace(/contentframe(\(\))?/g, 'internal:control=enter-frame').replace(/locator\(([^)]+),hastext=([^),]+)\)/g, 'locator($1).internal:has-text=$2').replace(/locator\(([^)]+),hasnottext=([^),]+)\)/g, 'locator($1).internal:has-not-text=$2').replace(/locator\(([^)]+),hastext=([^),]+)\)/g, 'locator($1).internal:has-text=$2').replace(/locator\(([^)]+)\)/g, '$1').replace(/getbyrole\(([^)]+)\)/g, 'internal:role=$1').replace(/getbytext\(([^)]+)\)/g, 'internal:text=$1').replace(/getbylabel\(([^)]+)\)/g, 'internal:label=$1').replace(/getbytestid\(([^)]+)\)/g, `internal:testid=[${testIdAttributeName}=$1]`).replace(/getby(placeholder|alt|title)(?:text)?\(([^)]+)\)/g, 'internal:attr=[$1=$2]').replace(/first(\(\))?/g, 'nth=0').replace(/last(\(\))?/g, 'nth=-1').replace(/nth\(([^)]+)\)/g, 'nth=$1').replace(/visible\(,?visible=true\)/g, 'visible=true').replace(/visible\(,?visible=false\)/g, 'visible=false').replace(/visible\(\)/g, 'visible=true').replace(/filter\(,?hastext=([^)]+)\)/g, 'internal:has-text=$1').replace(/filter\(,?hasnottext=([^)]+)\)/g, 'internal:has-not-text=$1').replace(/filter\(,?has2=([^)]+)\)/g, 'internal:has=$1').replace(/filter\(,?hasnot2=([^)]+)\)/g, 'internal:has-not=$1').replace(/,exact=false/g, '').replace(/,exact=true/g, 's').replace(/,includehidden=/g, ',include-hidden=').replace(/\,/g, ']['); | ||
template = template.replace(/\,set([\w]+)\(([^)]+)\)/g, (_, group1, group2) => ',' + group1.toLowerCase() + '=' + group2.toLowerCase()).replace(/framelocator\(([^)]+)\)/g, '$1.internal:control=enter-frame').replace(/contentframe(\(\))?/g, 'internal:control=enter-frame').replace(/locator\(([^)]+),hastext=([^),]+)\)/g, 'locator($1).internal:has-text=$2').replace(/locator\(([^)]+),hasnottext=([^),]+)\)/g, 'locator($1).internal:has-not-text=$2').replace(/locator\(([^)]+),hastext=([^),]+)\)/g, 'locator($1).internal:has-text=$2').replace(/locator\(([^)]+)\)/g, '$1').replace(/getbyrole\(([^)]+)\)/g, 'internal:role=$1').replace(/getbytext\(([^)]+)\)/g, 'internal:text=$1').replace(/getbylabel\(([^)]+)\)/g, 'internal:label=$1').replace(/getbytestid\(([^)]+)\)/g, `internal:testid=[${testIdAttributeName}=$1]`).replace(/getby(placeholder|alt|title)(?:text)?\(([^)]+)\)/g, 'internal:attr=[$1=$2]').replace(/first(\(\))?/g, 'nth=0').replace(/last(\(\))?/g, 'nth=-1').replace(/nth\(([^)]+)\)/g, 'nth=$1').replace(/filter\(,?visible=true\)/g, 'visible=true').replace(/filter\(,?visible=false\)/g, 'visible=false').replace(/filter\(,?hastext=([^)]+)\)/g, 'internal:has-text=$1').replace(/filter\(,?hasnottext=([^)]+)\)/g, 'internal:has-not-text=$1').replace(/filter\(,?has2=([^)]+)\)/g, 'internal:has=$1').replace(/filter\(,?hasnot2=([^)]+)\)/g, 'internal:has-not=$1').replace(/,exact=false/g, '').replace(/,exact=true/g, 's').replace(/,includehidden=/g, ',include-hidden=').replace(/\,/g, ']['); | ||
const parts = template.split('.'); | ||
@@ -130,0 +130,0 @@ // Turn "internal:control=enter-frame >> nth=0" into "nth=0 >> internal:control=enter-frame" |
@@ -88,3 +88,3 @@ "use strict"; | ||
var _normalizedWhitespace2; | ||
result = text.replace(/\u200b/g, '').trim().replace(/\s+/g, ' '); | ||
result = text.replace(/[\u200b\u00ad]/g, '').trim().replace(/\s+/g, ' '); | ||
(_normalizedWhitespace2 = normalizedWhitespaceCache) === null || _normalizedWhitespace2 === void 0 || _normalizedWhitespace2.set(text, result); | ||
@@ -91,0 +91,0 @@ } |
{ | ||
"name": "playwright-core", | ||
"version": "1.51.0-alpha-1740489818000", | ||
"version": "1.51.0-alpha-1740682850000", | ||
"description": "A high-level API to automate web browsers", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Potential vulnerability
Supply chain riskInitial human review suggests the presence of a vulnerability in this package. It is pending further analysis and confirmation.
Found 1 instance in 1 package
58
7933664
110893