fix: ElementHandle dragAndDrop should fail when interception is disabled (#10209)
This commit is contained in:
parent
9cba24a961
commit
bcf5fd87ae
2
.github/workflows/issue-analyzer.yml
vendored
2
.github/workflows/issue-analyzer.yml
vendored
@ -100,6 +100,8 @@ jobs:
|
|||||||
- name: Verify issue
|
- name: Verify issue
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
run: ${{ env.PACKAGE_MANAGER }} run verify
|
run: ${{ env.PACKAGE_MANAGER }} run verify
|
||||||
|
env:
|
||||||
|
DEBUG: 'puppeteer:*'
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
if: success() || failure()
|
if: success() || failure()
|
||||||
with:
|
with:
|
||||||
|
@ -502,6 +502,10 @@ export class CDPElementHandle<
|
|||||||
target: CDPElementHandle<Node>,
|
target: CDPElementHandle<Node>,
|
||||||
options?: {delay: number}
|
options?: {delay: number}
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
|
assert(
|
||||||
|
this.#page.isDragInterceptionEnabled(),
|
||||||
|
'Drag Interception is not enabled!'
|
||||||
|
);
|
||||||
await this.#scrollIntoViewIfNeeded();
|
await this.#scrollIntoViewIfNeeded();
|
||||||
const startPoint = await this.clickablePoint();
|
const startPoint = await this.clickablePoint();
|
||||||
const targetPoint = await target.clickablePoint();
|
const targetPoint = await target.clickablePoint();
|
||||||
|
Loading…
Reference in New Issue
Block a user