[Selenium webdriver Java] processing pop-up windows

Source: Internet
Author: User

Selenium webdriver tests pop-up windows, including identifying pop-ups, transferring driver to a new window, executing the steps in a new string hook, and then converting to the original window.

Identified and processed by name:

Selenium Webdriver allows us to identify the window through the Name property or a handle to the window, and then switch between the different Windows through the Webdriver.switchto (). Window () method.

Definition of Window Name property

The Name property can be set or given a window whose value is a string. The syntax is as follows:

1 window.name = [name]

The name is specified in the open () method when the window is created or by using the Name property of a <frame> tag, by default the Name property value is empty.

Tip: The Name property of the window can be used for the target property value of the <a> or <form> tag, which means that the hyperlink document or form submission results should appear in the window or frame of the specified name.

Personal feeling this name property is less common and most sites are default values, which are empty

[Selenium webdriver Java] processing pop-up windows

Related Article

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.