Selenium Webdriver Study (iii)---positioning by linktext

Source: Internet
Author: User

Linktext is the link text, we can find the element by Linktext

First, the problem scenario

In HTML the,<a> tag represents a link to the CSDN site as an example

As an example of a red box, an HREF represents a jump address after the link has been clicked, selenium to find the element by text information

Second, the Code implementation

Three, the realization principle

1, first open the corresponding URL

2. Navigate to the link by text message

3. Click the link to open the CSDN blog link in the new interface

Iv. Matters of note

Since the link is found, you need to click to jump, so do not lack the click of this action

V. Similar methods

Similar to Partiallinktext.

Selenium Webdriver Study (iii)---positioning by linktext

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.