2021-04-29 15:07:37 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package perl-Playwright
|
|
|
|
|
#
|
2022-02-15 15:15:30 +00:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2021-04-29 15:07:37 +00:00
|
|
|
#
|
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%define cpan_name Playwright
|
|
|
|
|
Name: perl-Playwright
|
2022-02-15 15:15:30 +00:00
|
|
|
Version: 0.018
|
2021-04-29 15:07:37 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: Perl client for Playwright
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
|
|
|
Source0: https://cpan.metacpan.org/authors/id/T/TE/TEODESIAN/%{cpan_name}-%{version}.tar.gz
|
|
|
|
|
Source1: cpanspec.yml
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
BuildRequires: perl
|
|
|
|
|
BuildRequires: perl-macros
|
|
|
|
|
BuildRequires: perl(Capture::Tiny)
|
|
|
|
|
BuildRequires: perl(File::ShareDir)
|
|
|
|
|
BuildRequires: perl(File::Which)
|
|
|
|
|
BuildRequires: perl(JSON)
|
|
|
|
|
BuildRequires: perl(JSON::MaybeXS)
|
|
|
|
|
BuildRequires: perl(LWP::UserAgent)
|
|
|
|
|
BuildRequires: perl(List::Util) >= 1.33
|
|
|
|
|
BuildRequires: perl(Net::EmptyPort)
|
2021-09-13 11:50:56 +00:00
|
|
|
BuildRequires: perl(Proc::ProcessTable)
|
2021-07-26 05:43:16 +00:00
|
|
|
BuildRequires: perl(Sereal::Decoder)
|
|
|
|
|
BuildRequires: perl(Sereal::Encoder)
|
2021-04-29 15:07:37 +00:00
|
|
|
BuildRequires: perl(Sub::Install)
|
|
|
|
|
BuildRequires: perl(Test2::Tools::Explain)
|
|
|
|
|
BuildRequires: perl(Test2::V0)
|
|
|
|
|
BuildRequires: perl(Test::Fatal)
|
|
|
|
|
BuildRequires: perl(Test::Mock::Cmd)
|
|
|
|
|
BuildRequires: perl(Test::MockFile)
|
|
|
|
|
BuildRequires: perl(Test::MockModule)
|
|
|
|
|
BuildRequires: perl(feature)
|
2021-09-07 16:43:31 +00:00
|
|
|
BuildRequires: perl(parent)
|
2021-04-29 15:07:37 +00:00
|
|
|
Requires: perl(Capture::Tiny)
|
|
|
|
|
Requires: perl(File::ShareDir)
|
|
|
|
|
Requires: perl(File::Which)
|
|
|
|
|
Requires: perl(JSON)
|
|
|
|
|
Requires: perl(JSON::MaybeXS)
|
|
|
|
|
Requires: perl(LWP::UserAgent)
|
|
|
|
|
Requires: perl(List::Util) >= 1.33
|
|
|
|
|
Requires: perl(Net::EmptyPort)
|
2021-09-13 11:50:56 +00:00
|
|
|
Requires: perl(Proc::ProcessTable)
|
2021-07-26 05:43:16 +00:00
|
|
|
Requires: perl(Sereal::Decoder)
|
|
|
|
|
Requires: perl(Sereal::Encoder)
|
2021-04-29 15:07:37 +00:00
|
|
|
Requires: perl(Sub::Install)
|
|
|
|
|
Requires: perl(feature)
|
2021-09-07 16:43:31 +00:00
|
|
|
Requires: perl(parent)
|
2021-04-29 15:07:37 +00:00
|
|
|
%{perl_requires}
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Perl interface to a lightweight node.js webserver that proxies commands
|
|
|
|
|
runnable by Playwright. Checks and automatically installs a copy of the
|
|
|
|
|
node dependencies in the local folder if needed.
|
|
|
|
|
|
|
|
|
|
Currently understands commands you can send to all the playwright classes
|
|
|
|
|
defined in api.json (installed wherever your OS puts shared files for CPAN
|
|
|
|
|
distributions).
|
|
|
|
|
|
|
|
|
|
See https://playwright.dev/versions and drill down into your relevant
|
|
|
|
|
version (run `npm list playwright` ) for what the classes do, and their
|
|
|
|
|
usage.
|
|
|
|
|
|
|
|
|
|
All the classes mentioned there will correspond to a subclass of the
|
|
|
|
|
Playwright namespace. For example:
|
|
|
|
|
|
|
|
|
|
# ISA Playwright
|
|
|
|
|
my $playwright = Playwright->new();
|
|
|
|
|
# ISA Playwright::BrowserContext
|
|
|
|
|
my $ctx = $playwright->newContext(...);
|
|
|
|
|
# ISA Playwright::Page
|
|
|
|
|
my $page = $ctx->newPage(...);
|
|
|
|
|
# ISA Playwright::ElementHandle
|
|
|
|
|
my $element = $ctx->select('body');
|
|
|
|
|
|
|
|
|
|
See example.pl for a more thoroughly fleshed-out display on how to use this
|
|
|
|
|
module.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -n %{cpan_name}-%{version}
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
perl Makefile.PL INSTALLDIRS=vendor
|
|
|
|
|
%make_build
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
make test
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%perl_make_install
|
|
|
|
|
%perl_process_packlist
|
|
|
|
|
%perl_gen_filelist
|
|
|
|
|
|
|
|
|
|
%files -f %{name}.files
|
2021-09-07 16:43:31 +00:00
|
|
|
%doc Changes README
|
2021-04-29 15:07:37 +00:00
|
|
|
%license LICENSE
|
|
|
|
|
|
|
|
|
|
%changelog
|