Closed LindaM2021 closed 3 years ago
select your element with another method than selectLink
. For instance, you could find in the crawler by a CSS selector instead. You have the whole API of symfony/dom-crawler available here.
I was able to reach the elements by ->filter() function. The problem is that the click function is expecting a link object such as
$crawler->filter('body > div > span')->link()
and when I add ->link()
it returns, Unable to navigate from a "span" tag error.
The original document says; do that to click a link:
$crawler = $client->click($crawler->selectLink('Sign in')->link());
However, the area I would like to click is something like the code below. There is no text.. In the browser, you can only see an icon.
I would be grateful if you have any idea.