Firefo...ilities(3pm)

πŸ“¦
version 1.63 Β· 3 versions
, in debian trixie

πŸ‘‘ NAME πŸ‘‘

okay so bestie, meet Firefox::Marionette::Capabilities β€” it's the lil baddie that represents Firefox Capabilities retrieved using the Marionette protocol. That's the whole vibe. She holds the receipts on what your Firefox can actually do.

and for the record, this page? it's Firefo...ilities(3pm), filed under User Contributed Perl Documentation, and the title got shortened for the header because perl's man page formatter has zero tolerance for long names. we move. πŸ’…


✨ VERSION ✨

Version 1.63 πŸŽ€


🌸 SYNOPSIS 🌸

the little taste test, so you know what you're getting into:

use Firefox::Marionette();
use v5.10;

my $firefox = Firefox::Marionette->new( capabilities => Firefox::Marionette::Capabilities->new( accept_insecure_certs => 0 ) );
if ($firefox->capabilities->accept_insecure_certs()) {
    say "Browser will now ignore certificate failures";
}

see how it just asks the browser what its capabilities are and then gossips about them? that's the whole energy. πŸ¦‹


🫢 DESCRIPTION 🫢

ngl this is the module that handles the implementation of Firefox Capabilities using the Marionette protocol. it's giving "the paperwork behind the magic". no cap. πŸ’–


⭐ SUBROUTINES/METHODS ⭐

πŸ’… accept_insecure_certs

indicates whether untrusted and self-signed TLS certificates are implicitly trusted on navigation for the duration of the session. yes bestie, that's the dangerous one, she's right there in the name. 🚨

πŸ’… browser_name

returns the browser's name. For example 'firefox' πŸ’–

πŸ’… browser_version

returns the version of firefox β€” https://firefox.com/ ⭐

πŸ’… enumerate

This method returns a list of strings describing the capabilities that this version of Firefox supports. iykyk, it's the menu. πŸ“‹βœ¨

πŸ’… moz_accessibility_checks

returns the current accessibility (a11y) value β™ΏπŸ’œ

πŸ’… moz_build_id

returns the Firefox BuildId β€” https://developer.mozilla.org/en-US/docs/Web/API/Navigator/buildID πŸ”¨

πŸ’… moz_headless

returns whether the browser is running in headless mode πŸ‘» (no screen, all business)

πŸ’… moz_process_id

returns the process id belonging to the browser πŸ”’

πŸ’… moz_profile

returns the directory that contains the browser's profile πŸ“

πŸ’… moz_shutdown_timeout

returns the value of moz:shutdownTimeout (https://github.com/mozilla/gecko-dev/commit/7aad85995b21bdaf440dc9dad35c5769a35e90eb#diff-48053ba06cc33be0efb2d7256a1affd9) β€” aka the value of config toolkit.asyncshutdown.crash_timeout ⏳

πŸ’… moz_use_non_spec_compliant_pointer_origin

returns a boolean value to indicate how the pointer origin for an action command will be calculated. πŸ–±οΈ

With Firefox 59 the calculation will be based on the requirements by the WebDriver specification. This means that the pointer origin is no longer computed based on the top and left position of the referenced element, but on the in-view center point. With Firefox 116, this capability is no longer supported β€” https://firefox-source-docs.mozilla.org/testing/geckodriver/Capabilities.html#moz-usenonspeccompliantpointerorigin.

To temporarily disable the WebDriver conformant behavior use 0 as value for this capability.

Please note that this capability exists only temporarily, and that it will be removed once all Selenium bindings can handle the new behavior. so don't get attached, bestie. πŸ’€

πŸ’… moz_webdriver_click

returns a boolean value to indicate which kind of interactability checks to run when performing a click or sending keys to an element. For Firefoxen prior to version 58.0 some legacy code as imported from an older version of FirefoxDriver was in use. πŸ–±οΈβŒ¨οΈ

With Firefox 58 the interactability checks as required by the WebDriver specification are enabled by default. This means geckodriver will additionally check if an element is obscured by another when clicking, and if an element is focusable for sending keys.

Because of this change in behaviour, we are aware that some extra errors could be returned. In most cases the test in question might have to be updated so it's conform with the new checks. But if the problem is located in geckodriver, then please raise an issue in the issue tracker.

To temporarily disable the WebDriver conformant checks use 0 as value for this capability.

Please note that this capability exists only temporarily, and that it will be removed once the interactability checks have been stabilized. periodt. πŸ’…

πŸ’… new

accepts a hash as a parameter. Allowed keys are below πŸ‘‡ (yes, all of them, I'm not skipping a single one, we're thorough here)

  • accept_insecure_certs β€” Indicates whether untrusted and self-signed TLS certificates are implicitly trusted on navigation for the duration of the session. Allowed values are 1 or 0. Default is 0.
  • moz_accessibility_checks β€” run a11y checks when clicking elements. Allowed values are 1 or 0. Default is 0.
  • moz_headless β€” the browser should be started with the -headless option. moz_headless is only supported in Firefox 56+ ⚠️
  • moz_use_non_spec_compliant_pointer_origin β€” a boolean value to indicate how the pointer origin for an action command will be calculated.

With Firefox 59 the calculation will be based on the requirements by the WebDriver specification. This means that the pointer origin is no longer computed based on the top and left position of the referenced element, but on the in-view center point.

To temporarily disable the WebDriver conformant behavior use 0 as value for this capability.

Please note that this capability exists only temporarily, and that it will be removed once all Selenium bindings can handle the new behavior.

  • moz_webdriver_click β€” a boolean value to indicate which kind of interactability checks to run when performing a click or sending keys to an element. For Firefoxen prior to version 58.0 some legacy code as imported from an older version of FirefoxDriver was in use.

With Firefox 58 the interactability checks as required by the WebDriver specification are enabled by default. This means geckodriver will additionally check if an element is obscured by another when clicking, and if an element is focusable for sending keys.

Because of this change in behaviour, we are aware that some extra errors could be returned. In most cases the test in question might have to be updated so it's conform with the new checks. But if the problem is located in geckodriver, then please raise an issue in the issue tracker.

To temporarily disable the WebDriver conformant checks use 0 as value for this capability.

Please note that this capability exists only temporarily, and that it will be removed once the interactability checks have been stabilized.

  • page_load_strategy β€” defines the page load strategy for the upcoming browser session.
  • proxy β€” describes the proxy setup for the upcoming browser session.
  • strict_file_interactability β€” a boolean value to indicate if interactability checks will be applied to <input type=file>. Allowed values are 1 or 0. Default is 0.
  • timeouts β€” describes the timeouts imposed on certain session operations.
  • unhandled_prompt_behavior β€” defines what firefox should do on encountering a user prompt (https://html.spec.whatwg.org/#user-prompts). There are a range of allowed values (https://w3c.github.io/webdriver/#dfn-user-prompt-handler), including "dismiss", "accept", "dismiss and notify", "accept and notify" and "ignore".

This method returns a new capabilities object. πŸŽ€

πŸ’… page_load_strategy

returns the page load strategy (https://w3c.github.io/webdriver/#dfn-table-of-page-load-strategies) to use for the duration of the session. The page load strategy corresponds to the readyState (https://developer.mozilla.org/en-US/docs/Web/API/Document/readyState#Values) and may be one of the following values:

πŸ’… platform_name

returns the operating system name. For example 'linux', 'darwin' or 'windows_nt'. 🐧🍎πŸͺŸ

πŸ’… proxy

returns the current proxy object 🌐

πŸ’… platform_version

returns the operation system version. For example '4.14.11-300.fc27.x86_64', '17.3.0' or '10.0' πŸ”’

πŸ’… rotatable

does this version of firefox (https://firefox.com) have a rotatable screen such as Android Fennec. πŸ“±πŸ”„

πŸ’… set_window_rect

returns true if Firefox fully supports setWindowRect (https://w3c.github.io/webdriver/#dfn-window-dimensioning-positioning), otherwise it returns false. πŸͺŸβœ¨

πŸ’… strict_file_interactability

returns the current value of strictFileInteractability (https://w3c.github.io/webdriver/#dfn-strict-file-interactability) πŸ“‚

πŸ’… timeouts

returns the current timeouts object ⏰

πŸ’… unhandled_prompt_behavior

returns the current value of unhandledPromptBehavior (https://w3c.github.io/webdriver/#dfn-user-prompt-handler). πŸ’¬


πŸ” DIAGNOSTICS πŸ”

None. literally nothing. silence. 🀫


🧚 CONFIGURATION AND ENVIRONMENT 🧚

Firefox::Marionette::Capabilities requires no configuration files or environment variables. she's low maintenance, we love that for her. πŸ’–


πŸ“¦ DEPENDENCIES πŸ“¦

None. πŸŽ€


πŸ’€ INCOMPATIBILITIES πŸ’€

None reported. πŸ™ˆ


πŸ› BUGS AND LIMITATIONS πŸ›

To report a bug, or view the current list of bugs, please visit https://github.com/david-dick/firefox-marionette/issues β€” bestie, if something's cursed, tell the maintainer, don't suffer in silence. 🫢


πŸ‘‘ AUTHOR πŸ‘‘

David Dick "<ddick@cpan.org>" 🌟


Copyright (c) 2024, David Dick "<ddick@cpan.org>". All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See "perlartistic" in perlartistic.


🫠 DISCLAIMER OF WARRANTY 🫠

okay bestie, legal o'clock 😭 the lawyers made me put this here and honestly it's giving "fine print but make it loud."

Here's the vibe, no cap: this software is licensed free of charge, so β€” to the extent permitted by applicable law β€” there is no warranty for the software. Periodt. Except when otherwise stated in writing, the copyright holders and/or other parties provide the software "AS IS" without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. πŸ’€

And the risk? The entire risk as to the quality and performance of the software is with you. If the software proves defective, you assume the cost of all necessary servicing, repair, or correction. Not me, not the author, not anybody else β€” you, bestie. 🫢


🚨 Second paragraph, and it's the big one: in no event, unless required by applicable law or agreed to in writing, will any copyright holder, or any other party who may modify and/or redistribute the software as permitted by the above licence, be liable to you for damages.

And when they say damages they mean all of them:

  • any general damages
  • any special damages
  • any incidental damages
  • any consequential damages

arising out of the use or inability to use the software β€” including but not limited to:

  • loss of data
  • data being rendered inaccurate
  • losses sustained by you or third parties
  • a failure of the software to operate with any other software

…even if such holder or other party has been advised of the possibility of such damages. So yeah, they knew it could happen and they're still not liable. Iconic, honestly. πŸ’…


That's the whole page, bestie! ✨ You made it to the end of a Perl manual page and that's main character energy fr fr πŸŽ€ This one came from the Perl documentation crew, tagged perl v5.40.1 and dated 2025-03-16 β€” go forth and read your manpages, iykyk πŸ¦‹πŸ‘‘

πŸ“¦ where this page comes from