tis-wapt-selenium-webdriver-firefox icon

Selenium WebDriver Firefox

Paquet d’installation silencieuse pour Selenium WebDriver Firefox

0.35.0-2

  • package: tis-wapt-selenium-webdriver-firefox
  • name: Selenium WebDriver Firefox
  • version: 0.35.0-2
  • categories: Development
  • maintainer: WAPT Team,Tranquil IT,Jimmy PELÉ
  • editor: Mozilla
  • licence: opensource_free,wapt_public
  • locale: all
  • target_os: windows
  • impacted_process: geckodriver
  • architecture: x64
  • signature_date:
  • size: 1.77 Mo
  • installed_size: 3.42 Mo
  • conflicts :

package           : tis-wapt-selenium-webdriver-firefox
version           : 0.35.0-2
architecture      : x64
section           : base
priority          : optional
name              : Selenium WebDriver Firefox
categories        : Development
maintainer        : WAPT Team,Tranquil IT,Jimmy PELÉ
description       : This package is used for update packages that require selenium usage, it provides the firefox driver
depends           : 
conflicts         : tis-selenium-firefox-driver
maturity          : PROD
locale            : all
target_os         : windows
min_wapt_version  : 2.3
sources           : https://github.com/mozilla/geckodriver/releases
installed_size    : 3420160
impacted_process  : geckodriver
description_fr    : Ce paquet est utilisé pour mettre à jour les paquets qui nécessitent l'utilisation de selenium, il fournit le pilote firefox
description_pl    : Ten pakiet jest używany do aktualizacji pakietów, które wymagają użycia selenu, zapewnia on sterownik firefoxa
description_de    : Dieses Paket wird für Update-Pakete verwendet, die die Verwendung von Selenium erfordern, und stellt den Firefox-Treiber bereit
description_es    : Este paquete se utiliza para actualizar los paquetes que requieren el uso de selenium, proporciona el controlador de firefox
description_pt    : Este pacote é utilizado para pacotes de actualização que requerem o uso de selénio, fornece o condutor firefox
description_it    : Questo pacchetto è usato per aggiornare i pacchetti che richiedono l'uso di selenium e fornisce il driver di firefox
description_nl    : Dit pakket wordt gebruikt om pakketten bij te werken die selenium moeten gebruiken, het levert het firefox-stuurprogramma
description_ru    : Этот пакет используется для обновления пакетов, требующих использования selenium, он предоставляет драйвер firefox
audit_schedule    : 
editor            : Mozilla
keywords          : 
licence           : opensource_free,wapt_public
homepage          : 
package_uuid      : 68614f6c-8780-45f1-830d-983c21095a32
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://searchfox.org/mozilla-central/source/testing/geckodriver/CHANGES.md
min_os_version    : 
max_os_version    : 
icon_sha256sum    : f29825658bf4490615a6bc1b73340c99410389b2b197cbdf7498755f2b6988f3
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature         : qcfLlxqxi0VDimmZzteiZXbfP7xi6HuNAW54KjHB0Wwsa+3MzpZ81KQBeAhwpH2LwQ6xDazXHJJhM3pY13cU16RB0u5rjJMDUpZG9DwPHjDPBJGwVgb6HYRQFS846MkppKC4oofdF8GVamFsBQO/DsLjUt9oohp7MmWwEExmbPUkltAyiCNEN40MT8prARxivhinaI/DPBfhiGKeZhEw5K4OC4m1BRuaD25TXYyVX5mmEm04S/TYw/DloW8XlOHU+lkV+vr5pKlK4ygbZOAHeB4gTSLWgJ+PKWscEOusYzomLkZ9t6KMhI/nX52XJ3IuBqA2jkcyF9aoJ//EBFrkDQ==
signature_date    : 2024-08-11T13:02:22.212449
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes

# -*- coding: utf-8 -*-
from setuphelpers import *


bin_name = "geckodriver.exe"


def install():
    zip_name = glob.glob("geckodriver-*.zip")[0]
    unzip(zip_name, ".")

    selenium_wapt_dir = makepath(WAPT.wapt_base_dir, "selenium")
    mkdirs(selenium_wapt_dir)
    driver_path = makepath(selenium_wapt_dir, bin_name)
    print(f'Copying: "{driver_path}" ({control.get_software_version()})')
    filecopyto(bin_name, selenium_wapt_dir)

    if not installed_softwares("Firefox") and not params.get("running_as_luti"):
        print(f'ERROR: You must install Firefox to use {control.name}\nYou can use the package "tis-firefox" or "tis-firefox-esr" for example')


def uninstall():
    selenium_wapt_dir = makepath(WAPT.wapt_base_dir, "selenium")
    driver_path = makepath(selenium_wapt_dir, bin_name)
    if isfile(driver_path):
        print(f'Removing: "{driver_path}"')
        remove_file(driver_path)
    if dir_is_empty(selenium_wapt_dir):
        print(f'Removing: "{selenium_wapt_dir}"')
        remove_tree(selenium_wapt_dir)

# -*- coding: utf-8 -*-
from setuphelpers import *
from setupdevhelpers import *


def update_package():
    # Declaring local variables
    package_updated = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    api_url = "https://api.github.com/repos/mozilla/geckodriver/releases/latest"
    download_dict = {
        "windows-arm64": "-win-aarch64.zip",
        "windows-x64": "-win64.zip",
        "windows-x86": "-win32.zip",
        "windows-all": "-win32.zip",
        "linux-x64": "-linux64.tar.gz",
        "linux-arm64": "-linux-aarch64.tar.gz",
        "macos-x64": "-macos.tar.gz",
        "macos-arm64": "-macos-aarch64.tar.gz",
    }
    download_str = download_dict[control.target_os + "-" + ensure_list(control.architecture)[0]]

    # Getting latest version information from official sources
    print("API used is: %s" % api_url)
    json_load = wgets(api_url, proxies=proxies, as_json=True)
    version = json_load["tag_name"].replace("v", "").replace(".windows", "")
    for to_download in json_load["assets"]:
        if download_dict[control.target_os + "-" + ensure_list(control.architecture)[0]] in to_download["name"]:
            download_url = to_download["browser_download_url"]
            latest_bin = to_download["name"]
            break

    # Downloading latest binaries
    print("Latest %s version is: %s" % (control.name, version))
    print("Download URL is: %s" % download_url)
    if not isfile(latest_bin):
        print("Downloading: %s" % latest_bin)
        wget(download_url, latest_bin, proxies=proxies)
    else:
        print("Binary is present: %s" % latest_bin)

    # Deleting outdated binaries
    remove_outdated_binaries(latest_bin, "zip")
    # arch_list = ensure_list(control.architecture)
    # remove_outdated_binaries(version, filename_contains=("x64" if "x64" in arch_list else "x86" if "x86" in arch_list else []))

    # # Checking version from file
    # if get_os_name() == "Windows" and "windows" in control.target_os.lower():
    #     version_from_file = get_version_from_binary(latest_bin)
    #     if Version(version_from_file, 4) == Version(version, 4):
    #         print(f"INFO: Binary file version ({version_from_file}) corresponds to online version ({version})")
    #     else:
    #         error(f"ERROR: Binary file version ({version_from_file}) do NOT corresponds to online version ({version})")

    # Changing version of the package
    if Version(version, 4) > Version(control.get_software_version(), 4):
        print("Software version updated (from: %s to: %s)" % (control.get_software_version(), Version(version)))
        package_updated = True
    else:
        print("Software version up-to-date (%s)" % Version(version))
    control.set_software_version(version)
    control.save_control_to_wapt()

    # Validating update-package-sources
    return package_updated

    # # Changing version of the package and validating update-package-sources
    # return complete_control_version(control, version)

adbaf9813e8ef3f1e6274fd70a0d9f34f7b4e72134ba4274947ad16a8cb15551 : setup.py
82da9f18c71ae9d3eb1c532bcbb5c90051a3faacf6aab4fdd44c7f463be0a2fc : update_package.py
f29825658bf4490615a6bc1b73340c99410389b2b197cbdf7498755f2b6988f3 : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
011d9a35250b5e357cbb9af2535ac402780e4c76ee1f09f786939506e7243e3b : luti.json
e6de1ee49aad29431f7b8ff366f10486d008dd5cd8dde94cb01d7e9e3d33d988 : geckodriver-v0.35.0-win64.zip
35d775aa23b686f4890cbe7c5795662d5bec95644e66043665b2d3903348ad5e : WAPT/control