Troubleshooting and Suggestions

In this lesson, we will learn how to write better and more accurate selectors. In addition to that, we will also discuss some more tests that you can create.

Viewing contents of the response

If you are calling $response->filter() and you get a failing test saying “InvalidArgumentException: The current node list is empty.”, you might not be using the correct filter, or the page is not the one you expect it to be. To find out what the response actually looks like, you may do var_dump($client->getResponse()); exit; inside your test.

Get hands-on with 1400+ tech skills courses.