Я могу войти на другие сайты, но starbucks.com кажется особенным. Скрипт застрял на странице входа навсегда.
Вот скриншот после отправки:
Linux + PHP + chromedriver + facebook-PHP-WebDriver + Селен
try{
$driver->get('https://app.starbucks.com/account/signin?ReturnUrl=https%3A%2F%2Fapp.starbucks.com%2F');
sleep(60);
$driver->takeScreenshot("s.png");
$user=$driver->findElement(WebDriverBy::id("username"));
$user->sendKeys("wild****@gmail.com");
sleep(60);
$driver->findElement(WebDriverBy::id("password"))->sendKeys("xxxx+")->submit();
sleep(60);
$driver->wait(60, 1000)->until(
WebDriverExpectedCondition::titleIs('Starbucks Coffee Company')
);
$cookies = $driver->manage()->getCookies();
print_r($cookies);````
I got a few warnings and a severe from console log, what do those mean?
[6]=>
array(3) {
["level"]=>
string(7) "WARNING"
["message"]=>
string(190) "https://jssdkcdns.mparticle.com/js/v2/2689bb1f07a4544aa30798862ab1df07/mparticle.js 28:61854 "The corresponding attribute value of nonInteraction must be a string, number, boolean, or null.""
["timestamp"]=>
int(1562331865383)
}
[7]=>
array(3) {
["level"]=>
string(6) "SEVERE"
["message"]=>
string(157) "https://assets.web.starbucksassets.com/weblx/static/signIn.7ee7f5476580837359aa.chunk.js 0:21324 Uncaught TypeError: Cannot read property 'body' of undefined"
["timestamp"]=>
int(1562331865383)
}