Selenium Webdriver Study notes (ii)

Source: Internet
Author: User

Selenium Webdriver

First, locate a group of elements:

Webdriver can conveniently use the Findelement method to locate objects that are fixed by a certain object. But sometimes we have to locate a group of objects, and then we need to use the findelements method.

Application Scenarios:

1. Bulk operation of objects, such as the selection of all the checkboxes on the page;

2. First get a set of objects, and then filter out some objects that need to be located in this set of objects. For example, locate all the checkboxes on the page and then select the last one.

Second, multi-layer frame, window positioning

Switch_to_frame ()

Switch_to_window ()

Sometimes we locate an element, the locator is not a problem, but has been unable to locate, this time to check whether this element is in a frame, selenium Webdriver provides a switch_to_frame method, can easily solve the problem.

Selenium Webdriver Study notes (ii)

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.