Robotframework Tutorial Using Notes--web Automated test pop-up window processing

Source: Internet
Author: User

In the Web Automation test, you will encounter various pop-up boxes, which are handled in selenium.

Pop-up boxes generally have such a few categories:

1, normal pop-up window, if it can be positioned, directly to the window, and then the corresponding operation.

2. If the browser system pop-up box, alter type, you can use the method: Dr.switchto (). alert (). Accept (); or dismiss (cancel), remember before processing to determine if there is an alter window, if the window comes out slowly or no window pops up, then the execution of this method will be an error. The Confirm type also uses these two methods.

3, and if it is open new browser window, it will need to switchtowindow.

So how do you deal with it in Robotframework?

I encountered a window during the test:

This should belong to the Confirm type, is not able to locate, in the robotframework need to do this:

1, although unable to locate, but can get to this window, first define the next window:

2. Choose to confirm or cancel:

This allows you to complete the operation of this window, and the direct choose is not effective.

If this is a modal window, you can refer to the following processing methods:

Http://www.robotframework.net/article/13

Robotframework Tutorial Using Notes--web Automated test pop-up window processing

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.