Commit Graph

1087 Commits

Author SHA1 Message Date
Nikolay Vitkov
cb079378bb
chore: add BiDi support for SetContent (#9878) 2023-03-20 14:00:13 +01:00
Nikolay Vitkov
9ccde6ebf5
chore: added * pattern for test expectations (#9870) 2023-03-20 10:59:50 +01:00
Alex Rudenko
aa7c475461
test: add a few regressed selectors (#9875) 2023-03-17 12:55:39 +01:00
dependabot[bot]
e3b8321f55
chore(deps): Bump glob from 9.2.1 to 9.3.0 (#9855)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nikolay Vitkov <34244704+Lightning00Blade@users.noreply.github.com>
2023-03-17 08:57:58 +01:00
jrandolf
9f9394ca42
chore: use parsel (#9865) 2023-03-16 14:41:38 +01:00
Nikolay Vitkov
16b39de5ca
chore: extract HTTP prep for BiDi network module (#9840) 2023-03-15 17:51:34 +01:00
Nikolay Vitkov
4351e0de9e
chore: fix Actions Node version to LTS (#9859) 2023-03-15 13:59:42 +01:00
Nikolay Vitkov
17c650b6d1
chore: prefer use of fs/promise to utils/promisify (#9848)
Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
2023-03-14 18:30:41 +01:00
jrandolf
dd16ecae03
chore: use custom tokenizer (#9837) 2023-03-14 10:13:23 +01:00
jrandolf
9044609be3
fix: sort elements based on selector matching algorithm (#9836) 2023-03-13 16:11:16 +01:00
Nikolay Vitkov
175362c048
chore: add BiDi for goto navigation (#9795) 2023-03-10 15:59:02 +00:00
Alex Rudenko
5bb41e1c11
chore: restore rimraf in test code (#9823) 2023-03-10 10:37:14 +01:00
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