Closed kkamara closed 2 years ago
# updating-command.txt
use Illuminate\Console\Command;
needs
use Illuminate\Console\Command;
use App\Browser;
use Facebook\WebDriver\WebDriverBy;
protected $description = 'Command description';
needs
private Browser $browser;
public function __construct(Browser $browser)
{
parent::__construct();
$this->browser = $browser;
}
private function getInput() {
echo 'say smtn:'.PHP_EOL;
$words = $this->ask('>>');
$this->info($words);
}
return 0;
needs
$this->browser->browse(function (\Laravel\Dusk\Browser $browser) {
$browser->visit('https://www.selenium.dev/');
});
$this->browser->quit();
return 0;
# updating-command.sh
commandPath="app/Console/Commands"
commandName="CrawlerTest"
file="$commandPath/$commandName.php"
sed -i "s/NewCrawler2022/1/g" $file
Resolved.