Unable to install Playwright in ActivePerl 5.28 and Starwberry Perl #60
Replies: 19 comments 15 replies
-
I use Test::MockFile for the module’s testsuite, which relies on Overload::FileCheck, which requires a real POSIX environment.
You can safely ignore this and install without tests by passing the -T option to cpan when installing.
If you read the report in the CPAN build log, you likely have messages along the lines of “no such symbol st_blksize”, due to Overload::FileCheck not doing an #ifdef checking for the windows version of this, st_blocks.
If for whatever reason you need the module testsuite to pass before installing, you’ll have to use something other than strawberry perl such as linux via WSL or mingw.
GSB
From: Pranav ***@***.***>
Sent: Tuesday, March 19, 2024 1:51 AM
To: teodesian/playwright-perl ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [teodesian/playwright-perl] Unable to install Playwright in ActivePerl 5.28 and Starwberry Perl (Discussion #60)
Hi There,
I am having difficulty installing Playwright module in windows.
I always get this error when installing Playwinght
"FAIL
! Installing Overload::FileCheck failed. See C:\users\prana.cpanm\work\1710830957.5132\build.log for details. Retry with --force to force install it.
Searching Test2::Harness::Util::IPC (0) on cpanmetadb ...
--> Working on Test2::Harness::Util::IPC
Fetching http://www.cpan.org/authors/id/E/EX/EXODIST/Test2-Harness-1.000155.tar.gz ... OK
Unpacking Test2-Harness-1.000155.tar.gz
Entering Test2-Harness-1.000155
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.58)
Running Makefile.PL
Configuring Test2-Harness-1.000155 ... OS unsupported
Test2-Harness currently only works on systems that support true forking.
N/A
! Configure failed for Test2-Harness-1.000155. See C:\users\prana.cpanm\work\1710830957.5132\build.log for details.
! Installing the dependencies failed: Module 'Test2::Harness::Util::IPC' is not installed, Module 'Overload::FileCheck' is not installed
! Bailing out the installation for Test-MockFile-0.036.
! Installing the dependencies failed: Module 'Test::MockFile' is not installed
! Bailing out the installation for Playwright-1.401."
Is there a way to install it on windows?
—
Reply to this email directly, view it on GitHub <#60> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB7BHM3MRQRV4TB5ZZSWJ23YY7N6PAVCNFSM6AAAAABE46HF6WVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZWGM4TGOBVGI> .
You are receiving this because you are subscribed to this thread. <https://github.com/notifications/beacon/AB7BHM3YMKQULZTJHKQIJ2TYY7N6PA5CNFSM6AAAAABE46HF6WWGG33NNVSW45C7OR4XAZNKIRUXGY3VONZWS33OVJRW63LNMVXHIX3JMTHAAYMP7Q.gif> Message ID: ***@***.*** ***@***.***> >
|
Beta Was this translation helpful? Give feedback.
-
Hi George, I installed Playwright using cpanm with the no-test option. However, when I attempted to run the Playwright code, I encountered the following error: Can't locate playwright_server! It seems that the playwright_server is not being located properly. I have double-checked the installation process and ensured that Playwright is in my PATH, but the issue persists. Do you have any insights or suggestions on how to resolve this issue? |
Beta Was this translation helpful? Give feedback.
-
Things added to your $PATH aren’t properly registered until you close and re-open your cmd session usually.
If that doesn’t work, by default strawberry perl puts every bin for modules in C:\\Strawberry\perl\bin, so you’ll want to add that to your $PATH variable via the standard means on windows.
You will need node.js for playwright_server to work, so I’d suggest downloading and installing that, along with the normal steps to get playwright working via npm/npx if you haven’t already.
GSB
From: Pranav ***@***.***>
Sent: Tuesday, March 19, 2024 10:05 PM
To: teodesian/playwright-perl ***@***.***>
Cc: George S. Baugh ***@***.***>; Comment ***@***.***>
Subject: Re: [teodesian/playwright-perl] Unable to install Playwright in ActivePerl 5.28 and Starwberry Perl (Discussion #60)
Hi George,
I installed Playwright using cpanm with the no-test option. However, when I attempted to run the Playwright code, I encountered the following error:
Can't locate playwright_server!
Please ensure it is installed in your PATH.
If you installed this module from CPAN, it should already be. at D:\Strawberry\perl\site\lib/Playwright.pm line 46.
Playwright::_check_node() called at D:\Strawberry\perl\site\lib/Playwright.pm line 98
Playwright::BEGIN() called at D:\Strawberry\perl\site\lib/Playwright.pm line 99
eval {...} called at D:\Strawberry\perl\site\lib/Playwright.pm line 99
require Playwright.pm called at playwright1.pl line 3
main::BEGIN() called at D:\Strawberry\perl\site\lib/Playwright.pm line 99
eval {...} called at D:\Strawberry\perl\site\lib/Playwright.pm line 99
BEGIN failed--compilation aborted at D:\Strawberry\perl\site\lib/Playwright.pm line 99.
Compilation failed in require at playwright1.pl line 3.
BEGIN failed--compilation aborted at playwright1.pl line 3.
It seems that the playwright_server is not being located properly. I have double-checked the installation process and ensured that Playwright is in my PATH, but the issue persists.
Do you have any insights or suggestions on how to resolve this issue?
—
Reply to this email directly, view it on GitHub <#60 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB7BHM6YRUCUYUOG736NZU3YZD4G5AVCNFSM6AAAAABE46HF6WVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DQNBXHEYDO> .
You are receiving this because you commented. <https://github.com/notifications/beacon/AB7BHM55L5Q4MXO3LQ4I4G3YZD4G5A5CNFSM6AAAAABE46HF6WWGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAQ4BCG.gif> Message ID: ***@***.*** ***@***.***> >
|
Beta Was this translation helpful? Give feedback.
-
Consider reading the POD for the module here:
https://metacpan.org/pod/Playwright#Perl-equivalents-for-playwright-test
It briefly introduces testing concepts in perl, and translates those into the assertion idiom you are familiar with.
From: Pranav ***@***.***>
Sent: Wednesday, March 27, 2024 1:02 PM
To: teodesian/playwright-perl ***@***.***>
Cc: George S. Baugh ***@***.***>; Comment ***@***.***>
Subject: Re: [teodesian/playwright-perl] Unable to install Playwright in ActivePerl 5.28 and Starwberry Perl (Discussion #60)
Hi George,
Thanks for the input; I was able to resolve the path problem. I have a query regarding the assertions. Could you provide an example of how to use the playwright assertions effectively? Any insights or resources you could recommend would be greatly appreciated.
Regards
Pranav Duggal
—
Reply to this email directly, view it on GitHub <#60 (reply in thread)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB7BHM4ENDVCA2IDU3RTG3TY2MCQDAVCNFSM6AAAAABE46HF6WVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DSMZSGA2TK> .
You are receiving this because you commented. <https://github.com/notifications/beacon/AB7BHM57PJC4JOOK7DQQAQDY2MCQDA5CNFSM6AAAAABE46HF6WWGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQARBFNO.gif> Message ID: ***@***.*** ***@***.***> >
|
Beta Was this translation helpful? Give feedback.
-
The module was neither designed nor tested on windows.
I figured if someone was serious about using this in a windows environment, they’d let me know and here we are.
Fork(), waitpid() and so forth don’t quite work right on windows. I’ll have to borrow some code I have to open a new cmd window to do any action which forks.
I’ll work on a patch to both this issue, and to add some platform specific notes to the POD soon.
From: Pranav ***@***.***>
Sent: Wednesday, March 27, 2024 1:56 PM
To: teodesian/playwright-perl ***@***.***>
Cc: George S. Baugh ***@***.***>; Comment ***@***.***>
Subject: Re: [teodesian/playwright-perl] Unable to install Playwright in ActivePerl 5.28 and Starwberry Perl (Discussion #60)
Hi George,
I am getting this error when using await method from playwright .pm
"Use of uninitialized value in waitpid at C:/Perl64/site/lib/Playwright/Util.pm line 75. Can't call method "filename" on an undefined value at C:/Perl64/site/lib/Playwright/Util.pm line 76."
Regards
Pranav Duggal
—
Reply to this email directly, view it on GitHub <#60 (reply in thread)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB7BHMZ5W77HY7YEBSR4JPTY2MI3RAVCNFSM6AAAAABE46HF6WVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DSMZSGUYDC> .
You are receiving this because you commented. <https://github.com/notifications/beacon/AB7BHM3UDOMCLF7BZXB2YN3Y2MI3RA5CNFSM6AAAAABE46HF6WWGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQARBGJK.gif> Message ID: ***@***.*** ***@***.***> >
|
Beta Was this translation helpful? Give feedback.
-
I haven’t had a chance to get to any of your newer concerns.
I expect to get some time this week to address them.
From: Pranav ***@***.***>
Sent: Monday, April 1, 2024 12:08 PM
To: teodesian/playwright-perl ***@***.***>
Cc: George S. Baugh ***@***.***>; Comment ***@***.***>
Subject: Re: [teodesian/playwright-perl] Unable to install Playwright in ActivePerl 5.28 and Starwberry Perl (Discussion #60)
Hi George,
I hope you're doing well! I just wanted to check in and see if you had a chance to read my previous message. Looking forward to hearing from you soon
Thanks
Pranav Duggal
—
Reply to this email directly, view it on GitHub <#60 (reply in thread)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB7BHMZLEM7WFOENUSBFT4LY3GIARAVCNFSM6AAAAABE46HF6WVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DSNZUHA3TO> .
You are receiving this because you commented. <https://github.com/notifications/beacon/AB7BHMZU3WN7D6PJ4HTSID3Y3GIARA5CNFSM6AAAAABE46HF6WWGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQARDZB2.gif> Message ID: ***@***.*** ***@***.***> >
|
Beta Was this translation helpful? Give feedback.
-
Ok, I've had a chance to finally look at this on windows. Holy hell developing a solution here is gonna be pulling teeth! Or, I'm going to have to ship over the modules I generate from a linux host. Lovely. |
Beta Was this translation helpful? Give feedback.
-
Ok, got running to a degree. To get past the File::Which problem, all that happens is playwright-server has to be renamed to playwright-server.bat. From there the core problem is that system() will hang when you attempt to daemonize anything (this is well known on windows), and as mentioned you have to use a separate cmd window to actually do stuff. I'll borrow the code from selenium-remote-driver that does this and see how it goes. |
Beta Was this translation helpful? Give feedback.
-
That won’t help you. Copying the actual playwright_server script in your $PATH to be playwright_server.bat makes it findable by File::Which. That’s all that matters here.
I’ll get the daemonization code finished sometime today and send out a new release that fixes this and other problems on windows.
GSB
From: Pranav ***@***.***>
Sent: Monday, April 8, 2024 12:03 PM
To: teodesian/playwright-perl ***@***.***>
Cc: George S. Baugh ***@***.***>; Comment ***@***.***>
Subject: Re: [teodesian/playwright-perl] Unable to install Playwright in ActivePerl 5.28 and Starwberry Perl (Discussion #60)
Hi George,
I renamed playwright_server to playwright_server.bat in Playwright.pm and try to run the playwright code I am getting this error below
"C:\Perl\site\bin\playwright-server.bat.BAT:1 @Rem <https://github.com/Rem> = '---Perl--- ^ SyntaxError: Invalid or unexpected token at internalCompileFunction (node:internal/vm:77:18) at wrapSafe (node:internal/modules/cjs/loader:1290:20) at Module._compile (node:internal/modules/cjs/loader:1342:27) at Module._extensions..js (node:internal/modules/cjs/loader:1437:10) at Module.load (node:internal/modules/cjs/loader:1212:32) at Module._load (node:internal/modules/cjs/loader:1028:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:142:12) at node:internal/main/run_main_module:28:49 Node.js v21.6.0".
Regards
Pranav Duggal
—
Reply to this email directly, view it on GitHub <#60 (reply in thread)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB7BHM2SAQUIPWPZOYEKQ7LY4LESPAVCNFSM6AAAAABE46HF6WVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TANBZGA3TC> .
You are receiving this because you commented. <https://github.com/notifications/beacon/AB7BHMYH5THP72LLA3CNUQDY4LESPA5CNFSM6AAAAABE46HF6WWGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQARIJ66.gif> Message ID: ***@***.*** ***@***.***> >
|
Beta Was this translation helpful? Give feedback.
-
I generally only have a few hours a week I can devote to this stuff, usually around the end of each week.
As mentioned I know what needs be done, but investigating the details took all the time I had last week.
I expect I can get it done this week, supposing no unforseen circumstances.
GSB
From: Pranav ***@***.***>
Sent: Wednesday, April 10, 2024 1:05 PM
To: teodesian/playwright-perl ***@***.***>
Cc: George S. Baugh ***@***.***>; Comment ***@***.***>
Subject: Re: [teodesian/playwright-perl] Unable to install Playwright in ActivePerl 5.28 and Starwberry Perl (Discussion #60)
Hi George,
I hope you're doing well. I was wondering if there's been any progress on the daemonization code.
Regards
Pranav Duggal
—
Reply to this email directly, view it on GitHub <#60 (reply in thread)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB7BHMYGBX7Q4Y5QAFPGM7LY4V5MDAVCNFSM6AAAAABE46HF6WVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TANZUGU4TS> .
You are receiving this because you commented. <https://github.com/notifications/beacon/AB7BHMZHCF4W4O2ES4EIWHTY4V5MDA5CNFSM6AAAAABE46HF6WWGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQARJ32O.gif> Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I've made an experimental patch and sent it upstream to master. I'll build a tarball and upload it here; test it out and let me know how it goes. I was able to fully run through the example.pl in the TLD of the repo with this code. |
Beta Was this translation helpful? Give feedback.
-
Hmm, looks like i spoke too soon. Still need to update the await code to do start /min instead of forking. Good ol' windows |
Beta Was this translation helpful? Give feedback.
-
Try that out. If you aren't familiar with installing perl modules manually, see here: I'll likely merge this to master and do a full release early next week unless you find anything especially egregious. |
Beta Was this translation helpful? Give feedback.
-
Well, it’s at least progress.
I’m unsure why async/await isn’t working for you.
Can you send me the script you are running?
GSB
From: Pranav ***@***.***>
Sent: Tuesday, April 16, 2024 10:50 AM
To: teodesian/playwright-perl ***@***.***>
Cc: George S. Baugh ***@***.***>; Comment ***@***.***>
Subject: Re: [teodesian/playwright-perl] Unable to install Playwright in ActivePerl 5.28 and Starwberry Perl (Discussion #60)
Hi George,
Hope you are doing fine. I tested the new build and run some testcases on the new playwright build. I am still observing the same issues that i observed with async and await methods. If I use the methods the perl interpreter stops in between. Also if playwright server is already running instead of saying "Re-using playwright server on port" it tries to open a new server.
Regards
Pranav Duggal
—
Reply to this email directly, view it on GitHub <#60 (reply in thread)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB7BHM6CSXUBY2NAKW4NF6LY5VCBTAVCNFSM6AAAAABE46HF6WVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TCMZRHE3TO> .
You are receiving this because you commented. <https://github.com/notifications/beacon/AB7BHM35PNV5BVK3LCZVXVDY5VCBTA5CNFSM6AAAAABE46HF6WWGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQARNL4S.gif> Message ID: ***@***.*** ***@***.***> >
|
Beta Was this translation helpful? Give feedback.
-
Your error here is not waiting on the promises returned by waitFor().
e.g.
my $promise = $locator->waitFor();
my $result = $driver->await( $promise );
Pretty much any method with wait in the name will need this treatment.
You have to do the same in javascript, the aysnc/await pattern is pretty key to understanding playwright, and most JS code these days.
See https://github.com/teodesian/playwright-perl/blob/main/example.pl#L55
For more examples on usage.
GSB
From: Pranav ***@***.***>
Sent: Tuesday, April 16, 2024 2:26 PM
To: teodesian/playwright-perl ***@***.***>
Cc: George S. Baugh ***@***.***>; Comment ***@***.***>
Subject: Re: [teodesian/playwright-perl] Unable to install Playwright in ActivePerl 5.28 and Starwberry Perl (Discussion #60)
Hi George,
Here is the code
my $handle = Playwright->new(port => 5555, debug => 1);
my $browser = $handle->launch( headless => 0, type => 'chrome' );
my $page = $browser->newPage();
$page->goto('https://demo.guru99.com/V4/index.php');
my $locator = $page->locator('[name="uid"]');
$locator->scrollIntoViewIfNeeded();
$locator->waitFor();
$locator->fill('mngr136913');
$locator = $page->locator('[name="password"]');
$locator->scrollIntoViewIfNeeded();
$locator->waitFor();
***@***.***');
$locator = $page->locator('[name=btnLogin]');
$locator->scrollIntoViewIfNeeded();
$locator->waitFor();
$locator->click();
$locator = $page->getByRole('link', { name => 'New Account' });
$locator->scrollIntoViewIfNeeded();
$locator->waitFor();
$locator->click();
$locator = $page->locator('[name="cusid"]');
$locator->scrollIntoViewIfNeeded();
$locator->waitFor();
$locator->fill('123456');
$locator = $page->locator('[name="inideposit"]');
my $promise = $locator->waitFor();
$handle->await($promise);
$locator->scrollIntoViewIfNeeded();
$locator->fill('10000');
$locator = $page->locator('[value=submit]');
$locator->scrollIntoViewIfNeeded();
$locator->waitFor();
$locator->click();
$page->close();
$browser->close();
I tested the code. Currently it is working fine but sometimes the perl interreter stops when waitFor is called.
Regards
Pranav Duggal
—
Reply to this email directly, view it on GitHub <#60 (reply in thread)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB7BHMYF24HEUKVBX6ZSWRLY5V3LZAVCNFSM6AAAAABE46HF6WVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TCMZUGI2DI> .
You are receiving this because you commented. <https://github.com/notifications/beacon/AB7BHM3OSISJODXAGAUTA2LY5V3LZA5CNFSM6AAAAABE46HF6WWGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQARNQKI.gif> Message ID: ***@***.*** ***@***.***> >
|
Beta Was this translation helpful? Give feedback.
-
Why? As far as I can tell everything is working.
GSB
From: Pranav ***@***.***>
Sent: Thursday, April 18, 2024 12:12 PM
To: teodesian/playwright-perl ***@***.***>
Cc: George S. Baugh ***@***.***>; Comment ***@***.***>
Subject: Re: [teodesian/playwright-perl] Unable to install Playwright in ActivePerl 5.28 and Starwberry Perl (Discussion #60)
Hi George,
I hope this message finds you well. I have a question regarding the forking process. Is it possible to utilize the Win32::Process module for forking on Windows systems, considering its capability to manipulate processes?
Regards
Pranav Duggal
—
Reply to this email directly, view it on GitHub <#60 (reply in thread)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB7BHMZHFEXNEV4FV4FP243Y575F7AVCNFSM6AAAAABE46HF6WVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TCNJXG4YTO> .
You are receiving this because you commented. <https://github.com/notifications/beacon/AB7BHM6UEGBPWJWFVZTQ3YLY575F7A5CNFSM6AAAAABE46HF6WWGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQARO6FK.gif> Message ID: ***@***.*** ***@***.***> >
|
Beta Was this translation helpful? Give feedback.
-
Ok, send me the patch then.
From: Pranav ***@***.***>
Sent: Thursday, April 18, 2024 12:30 PM
To: teodesian/playwright-perl ***@***.***>
Cc: George S. Baugh ***@***.***>; Comment ***@***.***>
Subject: Re: [teodesian/playwright-perl] Unable to install Playwright in ActivePerl 5.28 and Starwberry Perl (Discussion #60)
Today, while testing some code with Playwright, I encountered another failure caused by the forking process. To troubleshoot, I switched to using the Win32::Process module, and I didn't encounter the issue again. It seems that using the Win32::Process module resolved the problem.
Regards
Pranav Duggal
—
Reply to this email directly, view it on GitHub <#60 (reply in thread)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB7BHM4TALJ246NOJHWRKWDY577IVAVCNFSM6AAAAABE46HF6WVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TCNJXHA4DI> .
You are receiving this because you commented. <https://github.com/notifications/beacon/AB7BHM7YKFLIPUNDVTSRS5DY577IVA5CNFSM6AAAAABE46HF6WWGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQARO6PY.gif> Message ID: ***@***.*** ***@***.***> >
|
Beta Was this translation helpful? Give feedback.
-
It would also help if you have a snippet of code that specifically is fixed by this patch – Ideally I can integrate it into example.pl, as that’s what I use to test that everything works each release.
GSB
From: Pranav ***@***.***>
Sent: Thursday, April 18, 2024 12:30 PM
To: teodesian/playwright-perl ***@***.***>
Cc: George S. Baugh ***@***.***>; Comment ***@***.***>
Subject: Re: [teodesian/playwright-perl] Unable to install Playwright in ActivePerl 5.28 and Starwberry Perl (Discussion #60)
Today, while testing some code with Playwright, I encountered another failure caused by the forking process. To troubleshoot, I switched to using the Win32::Process module, and I didn't encounter the issue again. It seems that using the Win32::Process module resolved the problem.
Regards
Pranav Duggal
—
Reply to this email directly, view it on GitHub <#60 (reply in thread)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB7BHM4TALJ246NOJHWRKWDY577IVAVCNFSM6AAAAABE46HF6WVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TCNJXHA4DI> .
You are receiving this because you commented. <https://github.com/notifications/beacon/AB7BHM7YKFLIPUNDVTSRS5DY577IVA5CNFSM6AAAAABE46HF6WWGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQARO6PY.gif> Message ID: ***@***.*** ***@***.***> >
|
Beta Was this translation helpful? Give feedback.
-
I suspect the module would work as-is if you actually waited on the promises returned by $locator->waitFor().
My $promise = $locator->waitFor();
$handle->await( $promise );
…
This is what the code in example.pl does, and it works just fine on windows.
Not waiting on promises will result in race conditions and other undefined behavior in your test.
As such I’m unconvinced as to the necessity of your patch.
Perhaps I should add something to the destructor to notify improper usage (leaving around unwaited promises), and make it die with a bad exit code so that your test fails.
GSB
From: Pranav ***@***.***>
Sent: Thursday, April 18, 2024 1:39 PM
To: teodesian/playwright-perl ***@***.***>
Cc: George S. Baugh ***@***.***>; Comment ***@***.***>
Subject: Re: [teodesian/playwright-perl] Unable to install Playwright in ActivePerl 5.28 and Starwberry Perl (Discussion #60)
I implemented the changes and tested this code
"use strict;
use warnings;
use Playwright;
use Data::Dumper;
my $handle = Playwright->new(port => 5555, debug => 1);
my $browser = $handle->launch( headless => 0, type => 'chrome' );
my $page = $browser->newPage();
$page->goto('https://demo.guru99.com/V4/index.php');
my $locator = $page->locator('[name="uid"]');
$locator->scrollIntoViewIfNeeded();
$locator->waitFor();
$locator->fill('mngr136913');
$locator = $page->locator('[name="password"]');
$locator->scrollIntoViewIfNeeded();
$locator->waitFor();
***@***.***');
$locator = $page->locator('[name=btnLogin]');
$locator->scrollIntoViewIfNeeded();
$locator->waitFor();
$locator->click();
$locator = $page->getByRole('link', { name => 'New Account' });
$locator->scrollIntoViewIfNeeded();
$locator->waitFor();
$locator->click();
$locator = $page->locator('[name="cusid"]');
$locator->scrollIntoViewIfNeeded();
$locator->waitFor();
$locator->fill('123456');
$locator = $page->locator('[name="inideposit"]');
my $promise = $locator->waitFor();
print Dumper $handle->await($promise);
$locator->scrollIntoViewIfNeeded();
$locator->fill('10000');
$locator = $page->locator('[value=submit]');
$locator->scrollIntoViewIfNeeded();
$locator->waitFor();
$locator->click();
$page->close();
$browser->close();
"
It was working fine for me.
Regards
Pranav Duggal
—
Reply to this email directly, view it on GitHub <#60 (reply in thread)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB7BHM5WZXRBCLS6XWFU4ULY6AHMNAVCNFSM6AAAAABE46HF6WVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TCNJYGUZTG> .
You are receiving this because you commented. <https://github.com/notifications/beacon/AB7BHM36CA2Y3YS5UMGSAI3Y6AHMNA5CNFSM6AAAAABE46HF6WWGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQARO7YK.gif> Message ID: ***@***.*** ***@***.***> >
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi There,
I am having difficulty installing Playwright module in windows.
I always get this error when installing Playwinght
"FAIL
! Installing Overload::FileCheck failed. See C:\users\prana.cpanm\work\1710830957.5132\build.log for details. Retry with --force to force install it.
Searching Test2::Harness::Util::IPC (0) on cpanmetadb ...
--> Working on Test2::Harness::Util::IPC
Fetching http://www.cpan.org/authors/id/E/EX/EXODIST/Test2-Harness-1.000155.tar.gz ... OK
Unpacking Test2-Harness-1.000155.tar.gz
Entering Test2-Harness-1.000155
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.58)
Running Makefile.PL
Configuring Test2-Harness-1.000155 ... OS unsupported
Test2-Harness currently only works on systems that support true forking.
N/A
! Configure failed for Test2-Harness-1.000155. See C:\users\prana.cpanm\work\1710830957.5132\build.log for details.
! Installing the dependencies failed: Module 'Test2::Harness::Util::IPC' is not installed, Module 'Overload::FileCheck' is not installed
! Bailing out the installation for Test-MockFile-0.036.
! Installing the dependencies failed: Module 'Test::MockFile' is not installed
! Bailing out the installation for Playwright-1.401."
Is there a way to install it on windows?
Beta Was this translation helpful? Give feedback.
All reactions