我刚刚安装了 playwright (v1.18.1) 来尝试一下 (Windows 11),我感觉有些不对劲。我可以正常运行 example.spec.ts 脚本,但如果我复制该文件然后尝试运行该副本,则会出现错误no tests found.。
这些步骤看起来很基本...
\n首先测试运行 C:\\playwright\\test\\tests\\example.spec.ts 脚本...
\nC:\\playwright\\test\\tests>npx playwright test example.spec.ts\n\nRunning 25 tests using 1 worker\n\n - example.spec.ts:14:3 \xe2\x80\xba New Todo \xe2\x80\xba should allow me to add todo items\nTerminate batch job (Y/N)?\n\n 25 skipped\nRun Code Online (Sandbox Code Playgroud)\n[这样有效]然后创建一个副本来开始玩......
\nC:\\playwright\\test\\tests>copy example.spec.ts test4.ts\n 1 file(s) copied.\nRun Code Online (Sandbox Code Playgroud)\n但在编辑 test4.ts 之前,我检查它是否会运行...
\nC:\\playwright\\test\\tests>npx playwright test test4.ts\n\n=================\n no tests found.\n=================\nnpm ERR! code 1\nnpm ERR! path C:\\playwright\\test\\tests\nnpm ERR! command failed\nnpm ERR! command C:\\WINDOWS\\system32\\cmd.exe /d …Run Code Online (Sandbox Code Playgroud) 我有一台PC可以通过PHP运行一些FTP,我知道它在1-2个月前就可以正常工作,但是现在回到它上面,我发现该PC不再工作了。我知道我一直在使用PC,但是我想不到可能发生了什么变化。
PHP抛出错误消息阅读
无法建立数据连接:连接被拒绝
...当我使用该ftp_put()功能时。
我使用的缩减代码是:
<?php
$trackErrors = ini_get('track_errors');
ini_set('track_errors', 1);
$server="***.***.***.***";
$port=21;
echo "<LI>Connecting to $server:$port<BR>";
$conn_id = ftp_connect($server,$port,9999999) or die("<BR>Unable to connect to ".$server.":$port server.");
if ( !$conn_id ) {
$errmsg = $php_errormsg;
echo "<BR><LI>ERR:$errmsg";
}
else {
$passive=false;
echo "<LI>Setting Passive Mode=$passive";
ftp_pasv($conn_id, $passive);
$user="*********";
$pass="*********";
echo "<LI>Connecting as $user/*****";
if (!ftp_login($conn_id, $user, $pass)) {
$msg = "Failed to login to $selected_server as $user; <BR>check logincredentials in the Settings";
echo "<BR><LI>$msg";
$errmsg = $php_errormsg;
echo …Run Code Online (Sandbox Code Playgroud)