如何在基本常规控制器中设置而不是从 TestCase 扩展的 TestController,设置为 Web 文本值的输入字段?
public function automatical_login_with_codes()
{
$browser = new HttpBrowser(HttpClient::create());
$client = Client::createChromeClient();
$jsLink = "document.querySelector('#ctl00_uxAuthenticationBlock_uxOpenLogin').click()";
$crawler = $client->request('GET', 'https://www.best.com/CategoryList.aspx?');
$client->executeScript($jsLink);
$client->waitFor('#ctl00_uxAuthenticationBlock_uxLoginText');// $this->assertSame
$crawler->filter('#ctl00_uxAuthenticationBlock_uxLoginText')->text('USERNAME'); <<-- NOT SET :(((
$check = $crawler->filter('#ctl00_uxAuthenticationBlock_uxLoginText')->text();
dd($check); //<- result nothing