Commit 629daf8
feat: make
This PR enhances the Cloudflare challenge handling logic by making the
click behaviour more flexible and reliable.
Two new options are introduced in postNavigationHooks.ts:
- `clickPositionCallback`
Allows users to manually specify the exact coordinates (x, y) where the
click should occur.
This is useful when the default DOM-based position detection fails, or
when the challenge layout varies across sites.
- `preChallengeSleepSecs`
Optional delay (in milliseconds) inserted before the first click
attempt.
This helps ensure the Cloudflare button and related elements are fully
rendered before detection or clicking begins.
Closes #3127
---------
Co-authored-by: Martin Adámek <banan23@gmail.com>handleCloudflareChallenge more configurable (#3247)1 parent a8177d3 commit 629daf8
File tree
1 file changed
+15
-3
lines changed- packages/playwright-crawler/src/internals/utils
1 file changed
+15
-3
lines changedLines changed: 15 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
697 | 697 | | |
698 | 698 | | |
699 | 699 | | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
700 | 704 | | |
701 | 705 | | |
702 | 706 | | |
| |||
788 | 792 | | |
789 | 793 | | |
790 | 794 | | |
791 | | - | |
792 | | - | |
| 795 | + | |
| 796 | + | |
793 | 797 | | |
794 | 798 | | |
795 | 799 | | |
796 | | - | |
| 800 | + | |
797 | 801 | | |
798 | 802 | | |
799 | 803 | | |
800 | 804 | | |
801 | 805 | | |
802 | 806 | | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
803 | 815 | | |
804 | 816 | | |
805 | 817 | | |
| |||
0 commit comments