Gets a mechanism to find elements by their link text. The link text to find. A object the driver can use to find the elements. If is null.
(string linkTextToFind)
| 173 | /// <returns>A <see cref="By"/> object the driver can use to find the elements.</returns> |
| 174 | /// <exception cref="ArgumentNullException">If <paramref name="linkTextToFind"/> is null.</exception> |
| 175 | public static By LinkText(string linkTextToFind) |
| 176 | { |
| 177 | if (linkTextToFind == null) |
| 178 | { |
| 179 | throw new ArgumentNullException(nameof(linkTextToFind), "Cannot find elements when link text is null."); |
| 180 | } |
| 181 | |
| 182 | return new By(LinkTextMechanism, linkTextToFind) |
| 183 | { |
| 184 | Description = "By.LinkText: " + linkTextToFind |
| 185 | }; |
| 186 | } |
| 187 | |
| 188 | /// <summary> |
| 189 | /// Gets a mechanism to find elements by their name. |
no outgoing calls