Gets a mechanism to find elements by their tag name. The tag name to find. A object the driver can use to find the elements. If is null.
(string tagNameToFind)
| 277 | /// <returns>A <see cref="By"/> object the driver can use to find the elements.</returns> |
| 278 | /// <exception cref="ArgumentNullException">If <paramref name="tagNameToFind"/> is null.</exception> |
| 279 | public static By TagName(string tagNameToFind) |
| 280 | { |
| 281 | if (tagNameToFind == null) |
| 282 | { |
| 283 | throw new ArgumentNullException(nameof(tagNameToFind), "Cannot find elements when name tag name is null."); |
| 284 | } |
| 285 | |
| 286 | return new By(TagNameMechanism, tagNameToFind) |
| 287 | { |
| 288 | Description = "By.TagName: " + tagNameToFind |
| 289 | }; |
| 290 | } |
| 291 | |
| 292 | /// <summary> |
| 293 | /// Gets a mechanism to find elements by their cascading style sheet (CSS) selector. |
no outgoing calls