Commit Graph

1075 Commits

Author SHA1 Message Date
jrandolf
364b23f8b5
fix: update dependencies (#9781) 2023-03-06 13:43:37 +01:00
jrandolf
813882db7b
chore: update glob (#9776) 2023-03-06 12:28:33 +01:00
jrandolf
2123f809e8
chore: remove rimraf (#9775) 2023-03-06 11:33:38 +01:00
jrandolf
f84873c121
chore: support commas in P selectors (#9769) 2023-03-06 10:56:52 +01:00
Henrik Skupin
d3b25df34d
chore: update test expectation data for Firefox for 19.7.2 downstream sync (#9756) 2023-03-01 13:00:51 +00:00
Nikolay Vitkov
004a99aaef
chore: implement simple BiDi ElementHandle (#9753) 2023-03-01 11:09:17 +01:00
Nikolay Vitkov
232873ae76
chore: fix Mocha test runner suggestion when hooks fail (#9750) 2023-02-28 12:55:20 +01:00
Nikolay Vitkov
3db7d55d26
chore: remove BigInt exists checks (#9744) 2023-02-24 19:26:29 +01:00
Nikolay Vitkov
9910aae2f7
chore: Fix BiDi session.status Param type (#9723) 2023-02-21 19:16:07 +00:00
jrandolf
84845e4901
chore: implement operations (#9717) 2023-02-21 11:12:27 +01:00
Nikolay Vitkov
9b54365df5
chore: Add Page.Console event to BiDi (#9700) 2023-02-20 13:00:29 +01:00
Nikolay Vitkov
eefe9583d0
chore: Add EsLint rule import/order (#9685) 2023-02-15 15:09:31 -08:00
jrandolf
2b3cf3ace9
chore: implement P queries (#9639) 2023-02-15 10:42:32 -08:00
jrandolf
e8f25e403f
refactor: custom query handlers and global bindings (#9678) 2023-02-15 07:33:18 -08:00
Nikolay Vitkov
0c85c0611c
chore: Implement JSHandle for BiDi (#9660) 2023-02-15 10:29:18 +00:00
jrandolf
56f99f7b10
refactor: migrate to iterator-based query handlers (#9676) 2023-02-14 13:31:30 -08:00
Alex Rudenko
df59d010c2
feat(chromium): roll to Chromium 111.0.5556.0 (r1095492) (#9656) 2023-02-13 09:46:01 +00:00
Henrik Skupin
404839d175
Refactor test expectation status for recent Firefox Nightly builds (#9642) 2023-02-10 12:45:40 +01:00
Nikolay Vitkov
b8ea891ab8
chore: Extract JSHandle to API (#9632) 2023-02-09 18:04:06 +01:00
Henrik Skupin
e14cf7ebac
fix: update test expectations for next Firefox Nightly changes (#9635) 2023-02-09 12:50:42 +01:00
Nikolay Vitkov
471e291e05
chore: Rename chrome-headless to new-headless (#9628) 2023-02-06 19:18:28 +01:00
Rafael Martins
ddb0cc174d
fix: page.goto error throwing on 40x/50x responses with an empty body (#9523) (#9577)
Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
2023-02-06 09:40:51 +00:00
charlieinitialdigital
c8bb11adfc
feat: add touchstart, touchmove and touchend methods (#9622) 2023-02-03 10:59:21 +00:00
Nikolay Vitkov
abcc1756dd
chore: Add BiDi Page.evaluate (#9609) 2023-02-02 15:14:28 +01:00
Rafael-Martins
f12f27e1eb
docs: clarify the waitForXPath return type (#9541) (#9583) 2023-02-01 15:23:32 +00:00
jrandolf
050a7b0624
fix: atomically get Puppeteer utilities (#9597) 2023-01-27 11:58:40 -08:00
Nikolay Vitkov
90ef8793ac
chore: Add --no-suggestion to custom test runner (#9598) 2023-01-27 12:20:32 +00:00
Alex Rudenko
6edd996768
fix(revert): use LazyArg for puppeteer utilities (#9590)
Reverts puppeteer/puppeteer#9575
2023-01-26 09:50:06 +01:00
jrandolf
496658f029
fix: use LazyArg for puppeteer utilities (#9575)
This PR fixes the following edge case:

 - `const oldPromise = world.puppeteerUtil`. 
- setContext occurs but context is immediately destroyed, i.e.
`world.#puppeteerUtil === oldPromise` is not resolved.
- clearContext occurs due to destruction, i.e. `world.#puppeteerUtil` is
replaced (`world.#puppeteerUtil !== oldPromise`).
 - `oldPromise` never resolves.
2023-01-26 08:56:33 +01:00
Alexandra Borovova
3d249dc3a3
chore: update test expectations for firefox (#9569)
<!-- Thanks for submitting a pull request! Please provide enough
information so that others can review your pull request. -->

**What kind of change does this PR introduce?**

Test expectation file update

**Did you add tests for your changes?**

no

**Summary**

Unskippes tests for Firefox and linux, which were missed in the previous
update

**Does this PR introduce a breaking change?**

no
2023-01-24 15:36:50 +01:00
Ophir Back
e3d69ec554
feat(page): Adding support for referrerPolicy in page.goto (#9561)
Issue: #9394

**What kind of change does this PR introduce?**

Feature - Added support of the `referrerPolicy` parameter (from CDP's
`Page.navigate`) to Puppeteer's `page.goto`.

**Did you add tests for your changes?**

No, currently it has no meaning that isn't browser implementation based,
which might get broken in the future. If there are suggestions to tests,
please let me know so I'll add them.

**If relevant, did you update the documentation?**
Yes, the documentation of the `goto` method has been updated.

**Summary**
I wanted to contribute to this project, which I used for testing on our
environment and saw issue #9394, so I decided to resolve it :)

**Does this PR introduce a breaking change?**
No. I added the `referrerPolicy` as an optional parameter, which will
use the HTTP header `Referrer-Policy` if not provided (much like the
`referer` parameter) so it will not interfere.

Co-authored-by: Ophir Back <ophir.back@broadcom.com>
2023-01-23 11:11:20 +00:00
Alexandra Borovova
9a97c5f8dd
chore: update test expectations for firefox (#9551)
What kind of change does this PR introduce?
Test expectation file update

Summary
Closes https://github.com/puppeteer/puppeteer/issues/9118.
This PR updates the test expectation file with more specific status for
firefox (like fail, fail-pass), removes the duplications.

Does this PR introduce a breaking change?
no
2023-01-23 11:20:19 +01:00
Alex Rudenko
41494950c0
chore: fix bidi expectations (#9562) 2023-01-23 10:09:19 +01:00
dependabot[bot]
6e484ffbdb
chore(deps): Bump glob from 8.0.3 to 8.1.0 (#9531)
Bumps [glob](https://github.com/isaacs/node-glob) from 8.0.3 to 8.1.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/isaacs/node-glob/blob/main/changelog.md">glob's
changelog</a>.</em></p>
<blockquote>
<h2>8.1</h2>
<ul>
<li>Add <code>windowsPathsNoEscape</code> option</li>
</ul>
<h2>8.0</h2>
<ul>
<li>Only support node v12 and higher</li>
<li><code>\</code> is now <strong>only</strong> used as an escape
character, and never as a
path separator in glob patterns, so that Windows users have a
way to match against filenames containing literal glob pattern
characters.</li>
<li>Glob pattern paths <strong>must</strong> use forward-slashes as path
separators, since <code>\</code> is an escape character to match literal
glob pattern characters.</li>
<li>(8.0.2) <code>cwd</code> and <code>root</code> will always be
automatically coerced
to use <code>/</code> as path separators on Windows, as they cannot
contain glob patterns anyway, and are often supplied by
<code>path.resolve()</code> and other methods that will use
<code>\</code> path
separators by default.</li>
</ul>
<h2>7.2</h2>
<ul>
<li>Add fs option to allow passing virtual filesystem</li>
</ul>
<h2>7.1</h2>
<ul>
<li>Ignore stat errors that are not <code>ENOENT</code> to work around
Windows issues.</li>
<li>Support using root and absolute options together</li>
<li>Bring back lumpy space princess</li>
<li>force 'en' locale in string sorting</li>
</ul>
<h2>7.0</h2>
<ul>
<li>Raise error if <code>options.cwd</code> is specified, and not a
directory</li>
</ul>
<h2>6.0</h2>
<ul>
<li>Remove comment and negation pattern support</li>
<li>Ignore patterns are always in <code>dot:true</code> mode</li>
</ul>
<h2>5.0</h2>
<ul>
<li>Deprecate comment and negation patterns</li>
<li>Fix regression in <code>mark</code> and <code>nodir</code> options
from making all cache
keys absolute path.</li>
<li>Abort if <code>fs.readdir</code> returns an error that's
unexpected</li>
<li>Don't emit <code>match</code> events for ignored items</li>
<li>Treat ENOTSUP like ENOTDIR in readdir</li>
</ul>
<h2>4.5</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="1b6bf20239"><code>1b6bf20</code></a>
8.1.0</li>
<li><a
href="1756fccfe7"><code>1756fcc</code></a>
add windowsPathsNoEscape option</li>
<li><a
href="af57da21c7"><code>af57da2</code></a>
update tap, libtap</li>
<li><a
href="e19db65d23"><code>e19db65</code></a>
Remove dependency on path-is-absolute</li>
<li>See full diff in <a
href="https://github.com/isaacs/node-glob/compare/v8.0.3...v8.1.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=glob&package-manager=npm_and_yarn&previous-version=8.0.3&new-version=8.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-18 09:12:52 +01:00
Kyrylo
3e80667048
chore: use named import for devtools-protocol module (#9511)
<!-- Thanks for submitting a pull request! Please provide enough
information so that others can review your pull request. -->

**What kind of change does this PR introduce?**
types fix

**Did you add tests for your changes?**
No

**If relevant, did you update the documentation?**
Not relevant

**Summary**
I am updating `import`s of `devtools-protocol` to always use named
import instead of the default.
For some reason, typescript doesn't understand when it is imported as
default.

```
node_modules/puppeteer-core/lib/esm/puppeteer/common/TargetManager.d.ts:23:59 - error TS2694: Namespace '"/Users/kyrylo/pacakge/node_modules/puppeteer-core/node_modules/devtools-protocol/types/protocol"' has no exported member 'Target'.

23 export declare type TargetFactory = (targetInfo: Protocol.Target.TargetInfo, session?: CDPSession) => Target;
                                                             ~~~~~~


Found 1 error in node_modules/puppeteer-core/lib/esm/puppeteer/common/TargetManager.d.ts:23
```

**Does this PR introduce a breaking change?**
No
<!-- If this PR introduces a breaking change, please describe the impact
and a migration path for existing applications. -->

**Other information**
I am updating `import`s of `devtools-protocol` to always use named
import instead of the default.
2023-01-17 11:34:57 +00:00
Kian-Meng Ang
4437bceb6e docs: fix typos (#9476)
Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
2023-01-16 20:25:09 +01:00
Alexandra Borovova
31ff55cc03
chore: filter expectations by the whole test or file name (#9503)
<!-- Thanks for submitting a pull request! Please provide enough
information so that others can review your pull request. -->

**What kind of change does this PR introduce?**

This is a change to a custom mocha runner to look for expectation of the
test case by the whole test name instead of by the part of the name.

**Summary**

Working on integration of the puppeteer expectation file in mozilla repo
and unskipping a lot of tests, I've noticed that some tests get wrong
statuses. For example, a test case with the name `navigation Page.goto
should fail when navigating to bad SSL` got the status of `navigation
Page.goto should fail when navigating to bad SSL after redirects` or
`ElementHandle specs ElementHandle.boundingBox should work` get the
status of `ElementHandle specs ElementHandle.boundingBox should work
with SVG nodes`. So it seems like checking for the whole name of the
test should be safer, but let me know if I'm missing something here.

**Does this PR introduce a breaking change?**
no
2023-01-13 16:14:37 +01:00
Alex Rudenko
06e816bbfa
feat(chromium): roll to Chromium 110.0.5479.0 (r1083080) (#9500)
Closes #9470
2023-01-12 11:31:20 +01:00
Alex Rudenko
29a50764d4
chore: add BiDi integration for Chromium (#9410)
This PR adds experimental support for WebDriver BiDi by making use of
chromium-bidi to implement the BiDi protocol. The tests are disabled on
Windows due to flakiness (filed
https://github.com/GoogleChromeLabs/chromium-bidi/issues/361).
2022-12-20 14:37:31 +00:00
jrandolf
c7a063a152
feat: add element validation (#9352)
This PR adds a method to ElementHandle that validates the tag type of
that handle and returns it.

Fixed: #8579, #9280
2022-12-19 13:25:56 +01:00
Darío Kondratiuk
e3e9cc622a
fix(puppeteer-core): target interceptor is not async (#9430)
I found that the only call to `addTargetInterceptor` passes
`onAttachedToTarget` and is not async.
I also found a typo 🤓
2022-12-17 17:47:21 +00:00
Alex Rudenko
02fe50194e
fix: improve a11y snapshot handling if the tree is not correct (#9405)
Bug #9404
2022-12-13 08:31:26 +00:00
Alex Rudenko
1668d47b2f
docs: various doc improvements (#9396)
See commits for details.

Closes #1837, #5880, #7822, #8101, #8821, #9367, #9382, #9378, #4731
2022-12-09 13:57:39 +01:00
Alex Rudenko
810e0cd74e
fix: remove oopif expectations and fix oopif flakiness (#9375)
With M109 the flakiness should be reduced. Any present flakiness should
be investigated.

Drive-by: a new debugging helper to debug on CI.
2022-12-09 11:36:39 +00:00
Nikolay Vitkov
1875da6191
feat(chromium): roll to Chromium 109.0.5412.0 (r1069273) (#9364)
Closes #9233
2022-12-07 14:54:00 +01:00
Henrik Skupin
be7626bad8
chore: fix race in test Frame.waitForFunction should work when context is destroyed (#9368)
Fixes the race condition which causes intermittent failures in Firefox
because we haven't implemented bootstrap scripts to run on document
creation.
2022-12-06 16:59:44 +00:00
Junyan
b7ebc5d9bb
feat(puppeteer-core): keydown supports commands (#9357)
Issue: #1313

<!-- Thanks for submitting a pull request! Please provide enough
information so that others can review your pull request. -->

**What kind of change does this PR introduce?**

Feature.

**Did you add tests for your changes?**

Yes.

**If relevant, did you update the documentation?**

Yes.

**Summary**

Supports keyboard shotcuts on MacOS. See Chrome Devtools Protocol
document:
https://chromedevtools.github.io/devtools-protocol/tot/Input/#method-dispatchKeyEvent.
2022-12-03 11:23:47 +01:00
Alex Rudenko
f3c87dcdb7
chore: upgrade mitt (#9340) 2022-11-29 19:50:58 +00:00
Alex Rudenko
507efc610b
chore: mark a waitForFunction test as flaky in Firefox (#9323) 2022-11-24 13:13:03 +01:00
Alex Rudenko
da92055e9c
chore: include headless in the flaky test expectation (#9316) 2022-11-23 15:11:26 +01:00