-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathcrawler_object.yaml
91 lines (91 loc) · 4.94 KB
/
crawler_object.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
questions:
-
uuid: 1eebf878-8b9e-6528-8747-99d84c92580c
question: 'How can you follow a redirection when using the Symfony Crawler client?'
answers:
- { value: $client->redirect(), correct: false }
- { value: $client->followRedirect(), correct: true }
- { value: $client->followRedirects(), correct: true }
- { value: $client->redirectAll(), correct: false }
help: 'https://symfony.com/doc/current/testing.html#redirecting'
-
uuid: 1eebf878-8ba0-66ca-8a74-99d84c92580c
question: 'What is the correct CssSelector class namespace?'
answers:
- { value: Symfony\Component\CssSelector\CssSelector, correct: true }
- { value: Symfony\Component\BrowserKit\CssSelector, correct: false }
- { value: Symfony\Component\DomCrawler\CssSelector, correct: false }
- { value: Symfony\Bundle\FrameworkBundle\CssSelector, correct: false }
help: 'https://symfony.com/doc/current/components/css_selector.html#id1'
-
uuid: 1ef80030-6e1b-6534-8970-7d5c3695d3e1
question: 'Which of the following methods is used to select nodes that match a CSS selector in Symfony DomCrawler?'
answers:
- { value: filterXpath(), correct: false }
- { value: filter(), correct: true }
- { value: eq(), correct: false }
- { value: first(), correct: false }
help: 'https://symfony.com/doc/7.0/testing/dom_crawler.html'
-
uuid: 1ef80033-e021-68a6-bdfe-d91142d7210b
question: 'What does the reduce() method in DomCrawler do?'
answers:
- { value: 'It reduces the number of nodes by selecting only the first node', correct: false }
- { value: 'It applies a callable to filter nodes, returning nodes for which the callable does not return false', correct: true }
- { value: 'It counts the number of nodes in the Crawler instance', correct: false }
- { value: 'It removes sibling nodes', correct: false }
help: 'https://symfony.com/doc/7.0/testing/dom_crawler.html'
-
uuid: 1ef80036-5b78-6dcc-80fa-f77948a3eeee
question: 'Which method should be used to get the parent nodes of a selected node in Symfony DomCrawler?'
answers:
- { value: children(), correct: false }
- { value: parents(), correct: true }
- { value: siblings(), correct: false }
- { value: nextAll(), correct: false }
help: 'https://symfony.com/doc/7.0/testing/dom_crawler.html'
-
uuid: 1ef80038-a364-6652-9e7e-85533c357fff
question: "What does the extract() method return when passed an array like ['_text', 'href']?"
answers:
- { value: 'It returns a string of all node values concatenated.', correct: false }
- { value: 'It extracts an array of attributes (text and href) for each node in the Crawler', correct: true }
- { value: "It returns the first node's text value only.", correct: false }
- { value: "It removes all nodes that don't have an href attribute.", correct: false }
help: 'https://symfony.com/doc/7.0/testing/dom_crawler.html'
-
uuid: 1ef80030-6e1b-6534-8970-7d5c3695d3e1
question: 'Which of the following methods is used to select nodes that match a CSS selector in Symfony DomCrawler?'
answers:
- { value: filterXpath(), correct: false }
- { value: filter(), correct: true }
- { value: eq(), correct: false }
- { value: first(), correct: false }
help: 'https://symfony.com/doc/7.0/testing/dom_crawler.html'
-
uuid: 1ef80033-e021-68a6-bdfe-d91142d7210b
question: 'What does the reduce() method in DomCrawler do?'
answers:
- { value: 'It reduces the number of nodes by selecting only the first node', correct: false }
- { value: 'It applies a callable to filter nodes, returning nodes for which the callable does not return false', correct: true }
- { value: 'It counts the number of nodes in the Crawler instance', correct: false }
- { value: 'It removes sibling nodes', correct: false }
help: 'https://symfony.com/doc/7.0/testing/dom_crawler.html'
-
uuid: 1ef80036-5b78-6dcc-80fa-f77948a3eeee
question: 'Which method should be used to get the parent nodes of a selected node in Symfony DomCrawler?'
answers:
- { value: 'children()', correct: false }
- { value: 'parents()', correct: true }
- { value: 'siblings()', correct: false }
- { value: 'nextAll()', correct: false }
help: 'https://symfony.com/doc/7.0/testing/dom_crawler.html'
-
uuid: 1ef80038-a364-6652-9e7e-85533c357fff
question: "What does the extract() method return when passed an array like ['_text', 'href']?"
answers:
- { value: 'It returns a string of all node values concatenated.', correct: false }
- { value: 'It extracts an array of attributes (text and href) for each node in the Crawler', correct: true }
- { value: "It returns the first node's text value only.", correct: false }
- { value: "It removes all nodes that don't have an href attribute.", correct: false }
help: 'https://symfony.com/doc/7.0/testing/dom_crawler.html'