You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Minimum length of levels in fining selector. Starts from `1`.
60
-
For more robust selectors give this param value around 4-5 depending on depth of
61
-
you DOM tree. If finder hits the `root`, this param is ignored.
62
-
63
-
### optimizedMinLength
51
+
### root
64
52
65
-
Minimum length for optimising selector. Starts from `2`.
66
-
For example selector `body > div > div > p` can be optimised to `body p`.
53
+
Defines the root of the search. Defaults to `document.body`.
67
54
68
-
### threshold
55
+
### timeoutMs
69
56
70
-
Max number of selectors to check before falling into `nth-child` usage.
71
-
Checking for uniqueness of selector is very costly operation, if you have DOM
72
-
tree depth of 5, with 5 classes on each level, that gives you more than 3k
73
-
selectors to check. Default `1000` is good enough in most cases.
57
+
Timeout to search for a selector. Defaults to `1000ms`. After the timeout, finder fallbacks to `nth-child` selectors.
74
58
75
-
### maxNumberOfTries
59
+
### seedMinLength
76
60
77
-
Max number of tries for the optimization. This is a trade-off between
78
-
optimization and efficiency. Default `10_000` is good enough in most cases.
61
+
Minimum length of levels in fining selector. Defaults to `3`.
79
62
80
-
### timeoutMs
63
+
### optimizedMinLength
81
64
82
-
Optional timeout in milliseconds. `undefined` (no timeout) by default. If `timeoutMs: 500` is provided, an error will be thrown if selector generation takes more than 500ms.
65
+
Minimum length for optimising selector. Defaults to `2`.
0 commit comments