@midscene/shared 0.17.0 → 0.17.1-beta-20250519071746.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/es/extractor.js
CHANGED
|
@@ -916,7 +916,7 @@ function getElementInfoByXpath(xpath) {
|
|
|
916
916
|
return null;
|
|
917
917
|
}
|
|
918
918
|
if (node instanceof HTMLElement) {
|
|
919
|
-
node.scrollIntoView({ behavior: "
|
|
919
|
+
node.scrollIntoView({ behavior: "instant", block: "center" });
|
|
920
920
|
}
|
|
921
921
|
return collectElementInfo(
|
|
922
922
|
node,
|
package/dist/lib/extractor.js
CHANGED
|
@@ -953,7 +953,7 @@ function getElementInfoByXpath(xpath) {
|
|
|
953
953
|
return null;
|
|
954
954
|
}
|
|
955
955
|
if (node instanceof HTMLElement) {
|
|
956
|
-
node.scrollIntoView({ behavior: "
|
|
956
|
+
node.scrollIntoView({ behavior: "instant", block: "center" });
|
|
957
957
|
}
|
|
958
958
|
return collectElementInfo(
|
|
959
959
|
node,
|
|
@@ -1507,7 +1507,7 @@ ${indentStr}${after}`;
|
|
|
1507
1507
|
return null;
|
|
1508
1508
|
}
|
|
1509
1509
|
if (node instanceof HTMLElement) {
|
|
1510
|
-
node.scrollIntoView({ behavior: "
|
|
1510
|
+
node.scrollIntoView({ behavior: "instant", block: "center" });
|
|
1511
1511
|
}
|
|
1512
1512
|
return collectElementInfo(
|
|
1513
1513
|
node,
|
package/package.json
CHANGED
package/src/extractor/locator.ts
CHANGED
|
@@ -144,7 +144,7 @@ export function getElementInfoByXpath(xpath: string): ElementInfo | null {
|
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
if (node instanceof HTMLElement) {
|
|
147
|
-
node.scrollIntoView({ behavior: '
|
|
147
|
+
node.scrollIntoView({ behavior: 'instant', block: 'center' });
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
return collectElementInfo(
|