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