* fix: If currentNode and root are the same, do not include them in the result
* fix: Tests that only child element is included in the result
Co-authored-by: jrandolf <101637635+jrandolf@users.noreply.github.com>
* fix: test failing in headful
* fix: install Firefox for headful tests
* fix: skip favicon.ico requests in test
* fix: auth test in headful
* fix: disable NetworkTimeServiceQuerying
* fix: filter more favicon requests
* fix: network test with favicon
* fix: improve fixes
Without this patch, two tests ignore the BINARY envvar, and fail when not using
the embedded chromium, unless the chromium executable path is defined via
PUPPETEER_EXECUTABLE_PATH, which should not be considered according to the
docs.
* fix: ensure dom binding is not called after detatch
Fixes#7814
* refactor: detach listeners instead
* refactor: safer approach
* fix: test in test/page.spec.ts
Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
Some recent changes to allow arm64 environments (including M1 macs) to
launch a chromium installation successfully before arm-compatible builds
were downloadable prevented the usage of PUPPETEER_EXECUTABLE_PATH in
some environments. Currently, when the platform is not darwin and the
arch is arm64, an executable cannot be specified using the environment
variable.
Generally speaking, environment variables have highest precedence for
options such as this since they depend on system configuration.
These change:
1. allow the ENV variable to always be used when defined and not
specified in LaunchOptions (and when not puppeteer-core)
2. Retain the existing behavior of assuming /usr/bin/chromium-browser on
platforms like Ubuntu (exact if-conditions preserved to avoid any
breaking changes)
3. Add some tests for this particular portion of the code.
The doc for boundingBox says that it should return the boundingBox
relative to the main frame, therefore, this fix would make the
actual implementation correspond to the documentation. boxModel
documentation does not have this note but I think it'd make sense
to have it match the behaviour of the boundingBox API.
So it appears that all bindings are added to the secondary world and all
evaluations are also running there. ElementHandle.evaluate is returning
handles from the main world though. Therefore, we need to be careful
and adopt handles to the right context before doing waitForSelector
So it appears that all bindings are added to the secondary world and all
evaluations are also running there. ElementHandle.evaluate is returning
handles from the main world though. Therefore, we need to be careful
and adopt handles to the right context before doing waitForSelector.
When using a custom Firefox profile for Puppeteer the modified
preferences as present in prefs.js need to be reset once the
profile is no longer needed by Puppeteer. If not done this could
cause side-effects when the profile is used next time outside
of Puppeteer.
As ride-along fix the "--foreground" argument for Firefox will
only be used on MacOS because that's the only supported platform.